Skip to content

Commit

Permalink
registry: enable deletion by default (#256)
Browse files Browse the repository at this point in the history
fixes #247

Signed-off-by: Nick Santos <[email protected]>
  • Loading branch information
nicks authored Sep 16, 2022
1 parent 8b6cb38 commit de6c9d9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions pkg/registry/registry.go
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,7 @@ func (c *Controller) Apply(ctx context.Context, desired *api.Registry) (*api.Reg
Image: desired.Image,
ExposedPorts: exposedPorts,
Labels: c.labelConfigs(existing, desired),
Env: []string{"REGISTRY_STORAGE_DELETE_ENABLED=true"},
},
&container.HostConfig{
RestartPolicy: container.RestartPolicy{Name: "always"},
Expand Down
1 change: 1 addition & 0 deletions pkg/registry/registry_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,7 @@ func TestApplyLabels(t *testing.T) {
}, config.Labels)
assert.Equal(t, "kind-registry", config.Hostname)
assert.Equal(t, "docker.io/library/registry:2", config.Image)
assert.Equal(t, []string{"REGISTRY_STORAGE_DELETE_ENABLED=true"}, config.Env)
}
}

Expand Down

0 comments on commit de6c9d9

Please sign in to comment.