Skip to content

PullSecret management for operators and their workload #2682

Open
@thetechnick

Description

@thetechnick

Type of question

Best practice, general context/help :)

Question

What did you do?
We want to deploy a large operator with multiple dependencies from a private repository, the structure looks like this:

+--------------+         +--------------+
|Private Repo 1|         |Private Repo 2|
+----^---------+         +----^---------+
     |                        |
+----+----+              +----+----+<------------------------+
|Catalog 1|              |Catalog 2|                         |
+----^----+              +----^----+<--------+               |
     |                        |              |               |
+----+----+              +----+-----+   +----+-----+   +-----+----+
|Top level|  dependency  |Operator 1|   |Operator 2|   |Operator 3|
|Operator +------------->+----+-----+   +--^---+---+   +---^------+
+---------+                   | dependency |   |dependency |
                              +------------+   +-----------+

Now it's easy for us to add pullSecrets to the CatalogSources of Catalog 1 & 2, as described here:
https://olm.operatorframework.io/docs/tasks/make-catalog-available-on-cluster/#using-registry-images-that-require-authentication-as-catalogbundleoperatoroperand-images

But we have a hard time to figure out how to best setup the pull secrets for the operand workload itself.

  1. We cannot use the cluster global pull secret, because we already have differently scoped credentials for the same registry (quay.io) included.
    https://docs.openshift.com/container-platform/4.7/openshift_images/managing_images/using-image-pull-secrets.html#images-update-global-pull-secret_using-image-pull-secrets
    Even if we could use the global pull secret, we would very much prefer to have the pull secrets scoped to just a single namespace/stack, as we want to deliver operator stacks, like this multiple times into the same cluster, which makes managing these secrets in a central place a bit tricky.

  2. Every Operator get's it's own ServiceAccount to isolate RBAC, so patching the default ServiceAccount will not give us pull permissions for every operand.

  3. Patching every Operator in the dependency chain to specify imagePullSecrets as part of their deployment specs within their CSV and to ensure that these Operators deploy all their pods with this set explicitly is very prone to errors and a lot of work.

What did you expect to see?
A simple UX to handle private registries via OLM.
e.g. by being able to specify pull secrets as part of a Subscription, similar to a CatalogSource, so the pullSecrets are added to ServiceAccount created by OLM?

What did you see instead? Under which circumstances?
Manual patching after installation or massive amount of work to handle pullSecrets within a whole product chain.

Environment

  • operator-lifecycle-manager version:

  • Kubernetes version information:
    OpenShift 4.9.22

  • Kubernetes cluster kind:
    Manged OpenShift / OSD / ROSA / ARO

Additional context
Ref, similar question: #2307

Metadata

Metadata

Assignees

Labels

triage/supportIndicates an issue that is a support question.

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions