-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Fix network diagnostic default image path #17315
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
Fix network diagnostic default image path #17315
Conversation
@openshift/networking @knobunc @sosiouxme PTAL |
/unassign @stevekuznetsov @liggitt |
cc449c5
to
2b52b6a
Compare
@knobunc @sosiouxme rebased, PTAL Looks like DiagnosticPod diagnostics '--images' flag has similar issue: https://bugzilla.redhat.com/show_bug.cgi?id=1475680 |
/retest |
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.
LGTM
Can we get some unit tests of the trim function please?
/lgtm |
/hold until we have unit tests |
- variable.DefaultImagePrefix is populated from {node,master}-config.yaml (imageConfig.format) and if this value is not specified in the config, openshift ansible defaults it to 'registry.access.redhat.com'. - Network diagnostics is run as a admin CLI command so there is no config for variable.DefaultImagePrefix and it defaults to 'registry.access.redhat.com' which may not be true for AWS or some other openshift environments. - This change will remove the registry path from the default image so that it defaults to registry configured on the openshift node. Example: Earlier image path: registry.access.redhat.com/openshift3/ose New image path: openshift3/ose On AWS node, this will resolve to registry.reg-aws.openshift.com:443/openshift3/ose
2b52b6a
to
fe892c5
Compare
@knobunc @sosiouxme Added unit test for trimRegistryPath(), PTAL |
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.
Great, thank you
/hold cancel |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: knobunc, pravisankar, sosiouxme 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 Please review the full test history for this PR and help us cut down flakes. |
3 similar comments
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
failure looks like a flake. |
/retest Please review the full test history for this PR and help us cut down flakes. |
9 similar comments
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
Automatic merge from submit-queue. |
Use the default image templates the same as they are used everywhere else - as visible defaults, and allow the user to provide templates with elements to be expanded. This reverts the intent of openshift#17315 with the implication that https://bugzilla.redhat.com/show_bug.cgi?id=1516589 is NOTABUG. We intend the defaults to include registry.access.redhat.com so that OCP users must explicitly override the image to get an image that's not shipped by RH. This doesn't affect origin users.
Use the default image templates the same as they are used everywhere else - as visible defaults, and allow the user to provide templates with elements to be expanded. This reverts the intent of openshift#17315 with the implication that https://bugzilla.redhat.com/show_bug.cgi?id=1516589 is NOTABUG. We intend the defaults to include registry.access.redhat.com so that OCP users must explicitly override the image to get an image that's not shipped by RH. This doesn't affect origin users.
variable.DefaultImagePrefix is populated from {node,master}-config.yaml
(imageConfig.format) and if this value is not specified in the config,
openshift ansible defaults it to 'registry.access.redhat.com'.
Network diagnostics is run as a admin CLI command so there is no config for
variable.DefaultImagePrefix and it defaults to 'registry.access.redhat.com'
which may not be true for AWS or some other openshift environments.
This change will remove the registry path from the default image so that it
defaults to registry configured on the openshift node.
Example:
Earlier image path: registry.access.redhat.com/openshift3/ose
New image path: openshift3/ose
On AWS node, this will resolve to registry.reg-aws.openshift.com:443/openshift3/ose