-
Notifications
You must be signed in to change notification settings - Fork 87
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
Support ImagePullSecret for pulling from private registry #584
base: main
Are you sure you want to change the base?
Conversation
@gniltaws would you be willing to add a test to https://github.com/redhat-cop/helm-charts/tree/main/charts/operators-installer/_integration-tests as part of this? I am working to get permissions so i can approve the workflow running, but you can run the tests locally too |
@itewk The default image pulls from private registry Does this repository have a way to handle secret data (like a token for The simplest way I can see to test this is to modify the existing _integration-tests/test-install-operator-1-automatic-intermediate-manual-upgrades-values.yaml that does the upgrade to use the default image from the private registry and add a |
no, we don't currently have a secret for |
if you want it as a k8s |
@garethahealy @gniltaws rather then putting a token in this repo which gives access to red hat private registry, which puts us at risk of violating some rules about use of that repo...why not create a quay.io repo and add a pull secret to that? |
I don't see the difference. We are not redistributing any of the Creating a mirror (which I think is what you are suggesting), makes the situation worse, as we are actually redistributing the image then. |
I wouldn't mirror one of the redhat.io images but rather have this test test against some other image that is already publically avaiable |
I see a few issues with that:
Feels like that's causing more issues, than the concern of pulling from the redhat.io registry... |
the chart woudldn't be packaged with a custom image. the test only would be set to reference the custom image/repo, which the tests actually already do, for precisly this reason, so the tests can run without access to redhat.io (https://github.com/redhat-cop/helm-charts/blob/main/charts/operators-installer/_integration-tests/test-install-operator-0-automatic-intermediate-manual-upgrades-values.yaml#L3) Really we just need the test to set the secret. we don't really need to verify the secret actually works. you could copy that exact test above and just add the parameter to set the secret. But anyway, if you all want to have the pull secret for redhat.io here. okay. |
linting failing due to:
|
I don't understand why the secret creation is failing in the integration test. Am I specifying the secret incorrectly? @garethahealy
|
it'll be because your fork/pull request cant access the secret: so this test would only work on the |
it doens't h ave to be on so optinos
you all have any preferences? i am fine with any of it |
I think strategy number 2 is the best strategy, but I don't want to make more work for you. I'm a little nervous about option 3 (YOLO strategy) working the first time, but I think it would only need minor changes, if anything. If it goes poorly, issue a bugfix and remove the tag for the bad version? Thoughts? @garethahealy @itewk |
The reliance on content contained in GitHub secrets presents a challenge not only in the management of credentials, but limitations on the testing aspects within pull requests. There are two approaches that I might suggest. Regardless of these approaches, I would not maintain an actual, valid credential to any registry. As a result, here are two approaches:
|
First, a big thank-you to @sabre1041! That saved me so much trial and error! Thanks also to @itewk for the guidance. I added my work-in-progress so I could ask a few questions on tooling:
|
|
@gniltaws now to clean up the pipeline jobs :) thanks for sticking with this! i know we made it much more complicated on you. but this thing is used in production at many a client so testing important. |
Is someone able to trigger the tests again? @itewk @garethahealy |
If the skopeo command in this latest version doesn't work, I'm going to need some advice on using skopeo and/or Ingress in a |
What specifically? |
How to address the registry in the
I got this error: I tried adding the port on ( |
Steps to set up port mapping to expose 80/443 are found here |
I think I figured out how to expose the registry so skopeo can use it. Could someone trigger the tests again? |
The error should be fixed now, is someone able to trigger the tests again? |
Thank you! I finally found the issue that I had been blind to. Could you run the tests workflow again? |
The integration test only failed because it hit the timeout after 30 minutes, not because of a yaml error or something like that. Is there a way to see more detail about what went wrong, or is the best course of action just to increase the timeout on the update job? |
It still timed out after 30 minutes despite my change to 35 minutes. Any ideas? |
What is this PR About?
Adds the ability to specify an image pull secret for pulling a custom image from a private container registry
How do we test this?
It should run as-is if pulling the default image, since it only adds the secret if
installPlanApproverAndVerifyJobsImagePullSecret
is specified.Test that the secret works requires
installPlanApproverAndVerifyJobsImage
to point at to an image in a private registryinstallPlanApproverAndVerifyJobsImagePullSecret
cc: @redhat-cop/day-in-the-life