-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
[3.6][Backport] Prune images (not)securely #16138
[3.6][Backport] Prune images (not)securely #16138
Conversation
Obsoletes openshift/ose#817 /test all |
/lgtm Not sure who's in charge of approving 3.6 picks. @smarterclayton ? |
|
/retest |
Yum flake again. @bparees for |
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.
one nit
%[1]s %[2]s --prune-over-size-limit --confirm | ||
|
||
# Force the insecure http protocol with the particular registry host name | ||
%[1]s %[2]s --registry-url=http://registry.example.org --confirm |
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.
shouldn't this example include the --force-insecure arg?
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.
It could, but as the command's help says:
Insecure connection is allowed in the following cases unless certificate-authority is specified:
- --force-insecure is given
- provided registry-url is prefixed with http://
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.
it wasn't clear to me that those were "either/or" conditions, I assumed they were both required. (to ensure that someone didn't accidentally use an insecure registry without explicitly intending to do so).
So if it's true that --force-insecure is not a requirement when explicitly indicating http, then i guess I retract my comment.
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.
(but maybe add an "or" to the help text)
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.
I see, I'll rephrase.
Determine the registry protocol once. Do not change to other protocol during the run. This will produce nicer output without unrelated protocol fallback errors. Do not default to insecure connection when the --registry-url is empty. Move registry client initialization just before the start of the pruner - so we can precisely determine whether to allow for insecure fall-back based on collected images and image streams. Move ping() outside of pruner. Instead, determine the registry URL before the pruner starts and assume it won't change during the run. Signed-off-by: Michal Minář <[email protected]>
Signed-off-by: Michal Minář <[email protected]>
de8a03b
to
b4bb2f7
Compare
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: bparees, miminar, soltysh The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these OWNERS Files:
You can indicate your approval by writing |
/retest |
/retest Please review the full test history for this PR and help us cut down flakes. |
Automatic merge from submit-queue |
Back-porting:
Resolves bz#1476779