New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
IR-119: Add IgnoreInvalidRefs for image pruner #708
IR-119: Add IgnoreInvalidRefs for image pruner #708
Conversation
/assign @bparees |
858cc2e
to
4742bbf
Compare
imageregistry/v1/01-crd.yaml
Outdated
@@ -617,6 +617,10 @@ spec: | |||
pruner jobs to retain. Defaults to 3 if not set. | |||
type: integer | |||
format: int32 | |||
ignoreInvalidRefs: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ignoreInvalidRefs: | |
ignoreInvalidImageReferences: |
makes it more explicit in case you need to ignore other types of references in the future for some reason.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Renamed. I couldn't choose between two options: name it the same as the flag (--ignore-invalid-refs), or give it а more natural name.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we can always deprecate/rename the cli arg to get things consistent in the future, probably better to move the api towards what we consider the better name to be (assuming we agree it's better).
general concept seems fine, suggested a rename of the field though |
4742bbf
to
951d79f
Compare
/retest |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: bparees, dmage The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Invalid image references in pods/builds/etc cause the image pruner to abort its job. This is the safest approach because even if the pruner has bugs, it won't delete anything that is in use. But as there is no validation for image references, some clusters have invalid references because of their users mistakes and the pruner should ignore them.
The default value for
ignoreInvalidRefs
isfalse
to maintain backward compatibility. But the operator will bootstrap the configuration object withignoreInvalidRefs: true
. So new clusters will haveignoreInvalidRefs: true
, upgraded from 4.5 clusters will haveignoreInvalidRefs: false
.