Skip to content
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

Add auth for registry.redhat.io in baremetal proxy cluster #58855

Closed
wants to merge 1 commit into from

Conversation

xiuwang
Copy link
Contributor

@xiuwang xiuwang commented Nov 15, 2024

https://reportportal-openshift.apps.ocp-c1.prod.psi.redhat.com/ui/#prow/launches/1630/645728 set proxy cluster from disconnect state, so there is no registry.redhat.io auth for openshift imagestream in openshift-config/pull-secret. Add step for such profile.

@jianlinliu @wewang58 Could you help to review this?
Thanks

@openshift-ci openshift-ci bot requested review from pamoedom and xueqzhan November 15, 2024 02:52
@xiuwang xiuwang force-pushed the add-redhat-registry-auth branch from dba99c3 to 7e44a2d Compare November 19, 2024 07:18
Copy link
Contributor

openshift-ci bot commented Nov 19, 2024

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: xiuwang
Once this PR has been reviewed and has the lgtm label, please assign aleskandro for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci-robot
Copy link
Contributor

[REHEARSALNOTIFIER]
@xiuwang: the pj-rehearse plugin accommodates running rehearsal tests for the changes in this PR. Expand 'Interacting with pj-rehearse' for usage details. The following rehearsable tests have been affected by this change:

Test name Repo Type Reason
periodic-ci-openshift-openshift-tests-private-release-4.17-multi-nightly-baremetal-upi-ovn-ipv4-disconnected-proxy-arm-f14 N/A periodic Registry content changed
periodic-ci-openshift-openshift-tests-private-release-4.17-multi-nightly-4.17-upgrade-from-stable-4.17-baremetal-upi-ovn-ipv4-disconnected-proxy-arm-f60 N/A periodic Registry content changed
periodic-ci-openshift-openshift-tests-private-release-4.16-multi-nightly-baremetal-upi-ovn-ipv4-disconnected-proxy-arm-f28 N/A periodic Registry content changed
periodic-ci-openshift-openshift-tests-private-release-4.18-multi-nightly-baremetal-upi-ovn-ipv4-disconnected-proxy-arm-f14 N/A periodic Registry content changed
periodic-ci-openshift-openshift-tests-private-release-4.18-multi-nightly-4.18-upgrade-from-stable-4.17-baremetal-upi-ovn-ipv4-disconnected-proxy-arm-f28 N/A periodic Registry content changed
periodic-ci-openshift-openshift-tests-private-release-4.18-multi-nightly-4.18-upgrade-from-stable-4.18-baremetal-upi-ovn-ipv4-disconnected-proxy-arm-f60 N/A periodic Registry content changed
periodic-ci-openshift-openshift-tests-private-release-4.17-multi-nightly-4.17-upgrade-from-stable-4.16-baremetal-upi-ovn-ipv4-disconnected-proxy-arm-f28 N/A periodic Registry content changed
Interacting with pj-rehearse

Comment: /pj-rehearse to run up to 5 rehearsals
Comment: /pj-rehearse skip to opt-out of rehearsals
Comment: /pj-rehearse {test-name}, with each test separated by a space, to run one or more specific rehearsals
Comment: /pj-rehearse more to run up to 10 rehearsals
Comment: /pj-rehearse max to run up to 25 rehearsals
Comment: /pj-rehearse auto-ack to run up to 5 rehearsals, and add the rehearsals-ack label on success
Comment: /pj-rehearse abort to abort all active rehearsals
Comment: /pj-rehearse network-access-allowed to allow rehearsals of tests that have the restrict_network_access field set to false. This must be executed by an openshift org member who is not the PR author

Once you are satisfied with the results of the rehearsals, comment: /pj-rehearse ack to unblock merge. When the rehearsals-ack label is present on your PR, merge will no longer be blocked by rehearsals.
If you would like the rehearsals-ack label removed, comment: /pj-rehearse reject to re-block merging.

Comment on lines +13 to +20
function add_redhat_registry_auth () {
# get the registry configures of the cluster
run_command "oc extract secret/pull-secret -n openshift-config --confirm --to /tmp"; ret=$?
if [[ $ret -eq 0 ]]; then
redhat_auth_user=$(cat "/var/run/vault/mirror-registry/registry_redhat.json" | jq -r '.user')
redhat_auth_password=$(cat "/var/run/vault/mirror-registry/registry_redhat.json" | jq -r '.password')
registry_cred=`echo $redhat_auth_user:$redhat_auth_password | base64 -w 0`

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe it's better to set registry url for a parameter in function add_redhat_registry_auth, so next time it's easy to add other registry.

@@ -4,6 +4,7 @@ workflow:
pre:
- chain: baremetal-lab-upi-conf-disconnected-proxy
- chain: baremetal-lab-upi-install
- ref: add-redhat-registry-auth
Copy link
Contributor

@jianlinliu jianlinliu Nov 19, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have no much objection on this.

The only concern is why the disconnected install run mirror images, then enable proxy together. Compared with other platforms, generally if we mirrored images, we would not enable proxy any more, the install chain would mirror openshift imagestream in mirror-images-tag-images, so do not need to update cluster pull-secret.

I would leave this to metal team to review. cc @jadhaj @mhanss @pamoedom

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

@jianlinliu jianlinliu Nov 25, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"cluster proxy + disconnected network" v.s "mirror-images + disconnected network", I meant, if this install workflow is for "mirror-images + disconnected network", in theory, no need to enable cluster proxy. That is my concern.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am working on removing the cluster wide proxy in this PR #59178

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will close this pr after #59178 merged

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @xiuwang #59178 is merged. Can you test with the latest master?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sgoveas now the cluster is a disconnected cluster, should have no such issuse.
I will get you know if I meet it again, thanks

@xiuwang
Copy link
Contributor Author

xiuwang commented Nov 26, 2024

/pj-rehearse periodic-ci-openshift-openshift-tests-private-release-4.18-multi-nightly-baremetal-upi-ovn-ipv4-disconnected-proxy-arm-f14

@openshift-ci-robot
Copy link
Contributor

@xiuwang: now processing your pj-rehearse request. Please allow up to 10 minutes for jobs to trigger or cancel.

Copy link
Contributor

openshift-ci bot commented Nov 26, 2024

@xiuwang: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/rehearse/periodic-ci-openshift-openshift-tests-private-release-4.18-multi-nightly-baremetal-upi-ovn-ipv4-disconnected-proxy-arm-f14 7e44a2d link unknown /pj-rehearse periodic-ci-openshift-openshift-tests-private-release-4.18-multi-nightly-baremetal-upi-ovn-ipv4-disconnected-proxy-arm-f14

Full PR test history. Your PR dashboard.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

@xiuwang xiuwang closed this Dec 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants