feat: use registry auth secret as image pull secret#124
Open
creydr wants to merge 3 commits intofunctions-dev:mainfrom
Open
feat: use registry auth secret as image pull secret#124creydr wants to merge 3 commits intofunctions-dev:mainfrom
creydr wants to merge 3 commits intofunctions-dev:mainfrom
Conversation
…eAccount When a registry auth secret is configured via spec.registry.authSecretRef, it is now also added to the default ServiceAccount's imagePullSecrets so that function pods can pull images from private registries at runtime.
Verifies the operator adds spec.registry.authSecretRef to the default ServiceAccount's imagePullSecrets during a middleware-update redeploy. Uses a dummy dockerconfigjson secret against the unauthenticated kind-registry since enabling registry auth would require either per-repository scoping (unsupported by htpasswd) or a second registry container, both adding too much infra overhead for this wiring test.
Extract shared string constants (deployerKeda, deployerRaw, oldFuncCLIVersion) to fix goconst warnings and add nolint:dupl directives on intentionally duplicated BeforeEach blocks.
Collaborator
Author
|
Hint: this leads to patching the default service account in the functions namespace (adding pullImageSecret refs). I am not sure if this distracts GitOps 🤔 |
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.
Summary
spec.registry.authSecretRefis configured, the operator now adds it to thedefaultServiceAccount'simagePullSecretsduring deploy, so function pods can pull images from private registries at runtime.serviceaccountsto the operator's RBAC permissions.dockerconfigjsonsecret against the unauthenticated kind-registry (documented in test comments: per-repository registry auth is not supported by htpasswd, and a second registry adds too much infra overhead).