Allow openshift-serverless namespace to pull images from openshift-marketplace#1663
Merged
Conversation
b4cc208 to
9e1b4b4
Compare
Member
Author
|
Generated files job will be fixed in #1662 |
9e1b4b4 to
7fba200
Compare
…rketplace When using `ON_CLUSTER_BUILDS` for `make images` I'm getting ``` Failed to pull image "image-registry.openshift-image-registry.svc:5000/openshift-marketplace/knative-operator": rpc error: code = Unknown desc = reading manifest latest in image-registry.openshift-image-registry.svc:5000/openshift-marketplace/knative-operator: unauthorized: authentication required ``` We need to allow `openshift-serverless` namespace to pull images from the namespace `openshift-marketplace` as documented in https://docs.openshift.com/container-platform/4.7/openshift_images/managing_images/using-image-pull-secrets.html#images-allow-pods-to-reference-images-across-projects_using-image-pull-secrets Apparently, the command that we already (pasted below) run is not enough for this case: ``` oc adm policy add-role-to-group system:image-puller system:unauthenticated --namespace openshift-marketplace ``` Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com>
7fba200 to
bb4855e
Compare
Member
Author
|
/cc @aliok |
pierDipi
commented
Aug 1, 2022
Comment on lines
53
to
+59
| # Allow OPM to pull the serverless-bundle from openshift-marketplace ns from internal registry. | ||
| oc adm policy add-role-to-group system:image-puller system:unauthenticated --namespace openshift-marketplace | ||
|
|
||
| # export ON_CLUSTER_BUILDS=true; make images | ||
| # will push images to ${OLM_NAMESPACE} namespace, allow the ${OPERATORS_NAMESPACE} namespace to pull those images. | ||
| oc adm policy add-role-to-group system:image-puller system:serviceaccounts:"${OPERATORS_NAMESPACE}" --namespace "${OLM_NAMESPACE}" | ||
|
|
Member
Author
There was a problem hiding this comment.
The other option might be:
oc adm policy add-role-to-group system:image-puller system:authenticated --namespace openshift-marketplace
but given the TODO above, I went with more minimal permissions possible without requiring to list every service account that would require keeping the list updated.
Contributor
|
/lgtm |
Contributor
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: dsimansk, pierDipi The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When using
ON_CLUSTER_BUILDSformake imagesI'm gettingWe need to allow
openshift-serverlessnamespace to pull imagesfrom the namespace
openshift-marketplaceas documented inhttps://docs.openshift.com/container-platform/4.7/openshift_images/managing_images/using-image-pull-secrets.html#images-allow-pods-to-reference-images-across-projects_using-image-pull-secrets
Apparently, the command that we already (pasted below) run is not
enough for this case:
This is blocking openshift/knative-eventing#1822, see also the same error here:
https://gcsweb-ci.apps.ci.l2s4.p1.openshiftapps.com/gcs/origin-ci-test/pr-logs/pull/openshift_knative-eventing/1822/pull-ci-openshift-knative-eventing-release-v1.4-46-test-e2e-aws-ocp-46/1553039593392050176/artifacts/test-e2e-aws-ocp-46/gather-extra/artifacts/pods.json, grep for
Back-off pulling image \"image-registry.openshift-image-registry.svc:5000/openshift-marketplace/knative-operator\"Signed-off-by: Pierangelo Di Pilato pierdipi@redhat.com