[Feature Request]: allow access to external Docker Registries, i.e. VMWare Harbor or Artifactory authenticated #2393
Labels
community
dashboard-team-review
kind/enhancement
New functionality request (existing augments or new additions)
priority/normal
An issue with the product; fix when possible
Feature description
@andrewballantyne @dgutride Currently, both for BYON and for Running Worbenches image pulling, only the internal Openshift docker registry is supported, where access to container images (image pulling) happens unauthenticated.
That is fine for workbench container image download repo / registry locations such as quay.io that do not require authentication, but not for other more restricted corporate use cases.
Now, there are efforts ongoing on my side that will soon come to pass regarding support for external Docker image registry.
However, the authentication info to access such external docker repositories, most of all in corporate environments, needs to be accessible in the form the imagePullSecretName.
Both for getting the info on imagePullSecretName into a Notebook Pod Spec
as well as for linking it up to the default service account for enabling downloading from an external registry that is access-protected (BYON case) so the image can be transferred to the interal openshift registry, I request a way to define, e.g. in OdhDashboardConfig CR, the name of the image pull secret containing the access credentials for an external authenticated registry.
Describe alternatives you've considered
Currently, IBM users had an image pull secret present in dashboard namespace, but for BYON mirroring into internal registry, needed to manually link up the image pull secret name with the default service account.
oc patch --namespace opendatahub serviceaccount/default --type merge -p '{"imagePullSecrets":[{"name": "all-icr-io"}]}'
For users without an internal openshift registry, using an external authenticated registry, they also have image pull secret pre-defined with the access credentials, both in the central dashboard namespace as well as in all Data Science Projects namespaces. For image pulling from external registries to work, they need to patch the Notebook CR Pod section manually, i.e. with a cronjob in openshift, to make authenticated pulling possible. If we had an image pull secret reference available in i.e. OdhDashboardConfig, we could then use that image pull secret name in assembly of the Notebook CRD in dashboard.
https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/#create-a-pod-that-uses-your-secret
In addition to the Notebook CRs / workbenches, this problem with authenticated registry access also occurs when specifying an authenticated repo docker location in imagestream tag.from.name:
Only if/when the image pull secret is linked to the default serviceaccount in the odh namespace does import of such an imagestream tag happen successfully. Regardless of presence of internal openshift registry. Makes sense, the imagestream tag lookup mechanism also needs to authenticate in case of private / authenticated docker repos.
Anything else?
Since this is a special corporate use case, i.e. at IBM, but also at other corporation, I propose to let customers needing authenticated access create their image pull secret for their external authenticated workbenches repo manually via their own CICD processes, not via Dashboard.
instead, Dashboard GUI and OdhDashboardConfig CRD only specify the name of an imagePullSecret, to be used in dashboard logic.
image pull secret needs to be present in all Opendatahub Namespaces ... I'd leave creation to corporate CICD and only reference it in Dashboard by name.
Global Cluster secret https://docs.openshift.com/container-platform/4.12/openshift_images/managing_images/using-image-pull-secrets.html#images-update-global-pull-secret_using-image-pull-secrets is not an option. For one thing, users may not have access to repos deemed globally accessible across namespaces by IT Security, for another thing, BYON and ODH workbench images repo is not relevant for an Openshift global repo and it is not advisable to enable access to workbench images authenticated repo to non-Opendatahub namespaces as well from a security perspective.
The text was updated successfully, but these errors were encountered: