-
Notifications
You must be signed in to change notification settings - Fork 5
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
Try to remove wrapper images (again) #621
Comments
I did some research regarding (1). It's definitely cumbersome and feels brittle so it would be good to think about how to write automated tests for this. That said, it looks doable. Some hints / links below. Everything assumes we have the following addition in the tasks:
Further, we narrow down the problem by focusing only on getting dependencies installed via Nexus. There is no guarantee that e.g. a client written in one of the languages can access a server using the private certificate without further configuration. I think this is acceptable. Now, on to the details about the build tasks:
I verified this works in general. Since
FYI @henrjk @gerardcl we discussed this issue last Friday. What are your thoughts on this? |
Thanks for the research and I also find this a good tradeoff. I like that it is less magic and of course that the need to have extra images would go away. |
Supply private certificate via secret volume to tasks. Closes #621.
Supply private certificate via secret volume to tasks. Closes #621.
Supply private certificate via secret volume to tasks. Closes #621.
Supply private certificate via secret volume to tasks. Closes #621.
Supply private certificate via secret volume to tasks. Closes #621.
Supply private certificate via secret volume to tasks. Closes #621.
Supply private certificate via secret volume to tasks. Closes #621.
Supply private certificate via secret volume to tasks. Closes #621.
Supply private certificate via secret volume to tasks. Closes #621.
Supply private certificate via secret volume to tasks. Closes #621.
Supply private certificate via secret volume to tasks. Closes #621.
At the moment, the images pushed to the GitHub registry are "wrapped", meaning they are used as
FROM
images in images located in the OpenShift image stream. The wrapper image exists for 3 reasons:For #620, but also for other reasons (simplicity, less error prone) it would be nice if we could get rid of wrapping images.
(3) Could be solved by switching from Aqua to Trivy, or, if that is not feasible short/mid-term, download the Aqua scanner during the pipeline run (and cache it for next runs)
(2) Could be solved by adding a config map with HTTP proxy env vars as keys and adding all keys of that config map to the task run. Interestingly, we do not need those env vars in our enterprise cluster at all anymore (though I am not certain how that is implemented right now)
(1) This is by far the trickiest. The problem is that a proper solution requires to run
update-ca-trust
, which requires root, which is not available in OpenShift. An alternative would be to try and configure things manually. The basis of any solution would be to store the cert in a secret, and then mount that secret into e.g./etc/ssl/certs
(this is e.g. described in https://paraspatidar.medium.com/add-self-signed-or-ca-root-certificate-in-kubernetes-pod-ca-root-certificate-store-cb7863cb3f87). That is already enough to make the cert available to all Go code (see https://go.dev/src/crypto/x509/root_linux.go), which is a big chunk of work. However, e.g.curl
wouldn't pick up the cert, one would need to usecurl --cacert /etc/ssl/certs/custom.pem
. In a similar fashion, we would need to ensure that the build tasks (Python, Java, Node, ...) pick up the cert correctly and any other tools we use (buildah, cnes-report, skopeo, and so on ...) also find the right cert. This looks like a daunting task. Maybe there is also another, Kubernetes "native" way to do this. I have not found anything that fits entirely, but there is still development in that area, see e.g. https://github.com/kubernetes/enhancements/tree/master/keps/sig-auth/3257-trust-anchor-sets.The text was updated successfully, but these errors were encountered: