gatewayapi: watch operator-namespace secrets for pull-secret rotation#5002
Open
radixo wants to merge 2 commits into
Open
gatewayapi: watch operator-namespace secrets for pull-secret rotation#5002radixo wants to merge 2 commits into
radixo wants to merge 2 commits into
Conversation
- add utils.AddSecretsWatch on the operator namespace in the gatewayapi controller's Add function - pull-secret rotations now reconcile the per-namespace copies pushed into each Gateway namespace instead of going stale until an unrelated event Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
Description
Bug fix for the Ingress Gateway (Gateway API) controller.
The gatewayapi controller copies
tigera-pull-secretfrom thetigera-operatornamespace into each Gateway namespace, but it did not watch the source secret. When a
customer rotated their pull secret, the per-namespace copies went stale until an
unrelated event triggered a gatewayapi reconcile — breaking image pulls for proxy pods
on reschedule or scale-up after a credential rotation.
This adds
utils.AddSecretsWatch(c, "", common.OperatorNamespace())to the gatewayapicontroller's
Addfunction, matching the pattern already used by the Installationcontroller (
pkg/controller/installation/core_controller.go). Rotations of the pullsecret (or any user-provided pull secret in the operator namespace) now immediately
enqueue a reconcile, which re-copies the updated data into every Gateway namespace.
make ut UT_DIR=./pkg/controller/gatewayapi— 15/15 specs pass. Watchwiring is controller-runtime plumbing not exercised by the unit suite; the existing
tests cover that the per-namespace copy is written on reconcile.
Fixes EV-6776
Release Note
For PR author
make gen-filesmake gen-versionsFor PR reviewers
A note for code reviewers - all pull requests must have the following:
kind/bugif this is a bugfix.kind/enhancementif this is a a new feature.enterpriseif this PR applies to Calico Enterprise only.