Repository navigation
ate-setup: reconcile ate-api-server ConfigMaps and roll out on config changes - #3370
Open
Mofi Rahman (moficodes) wants to merge 1 commit into
Open
Mofi Rahman (moficodes) wants to merge 1 commit into
Mofi Rahman (moficodes) wants to merge 1 commit into
Conversation
Collaborator
|
I think we need to get this in for 1.0.0. As Haven Xia (@HavenXia) mentioned offline, this may break if a user does a rollback to 1.0.0 from 1.x. |
Max Thompson (thompsonmax)
self-requested a review
October 29, 2026 18:55
…e-api-server on change EnsureAPIServerPrerequisites previously created ConfigMap/ate-api-authentication only when it was missing. On cluster upgrades with older schema configurations, or when operators provided --ateapi-expected-jwt-issuer, existing ConfigMaps were kept unmodified and flag overrides were ignored. Additionally, the deployment env-hash only digested environment variables, leaving running ate-api-server pods on stale authentication and server configurations. Reconcile ate-api-authentication when missing, when an expected JWT issuer is explicitly configured, or when the stored configuration fails schema validation (such as after an upgrade changes the config schema or a rollback leaves unsupported fields). Valid custom authentication configurations with extra JWT providers are preserved. Similarly, ensureAPIConfig validates stored apiconfig.textproto payloads and rewrites invalid configurations to defaults while preserving valid customized log levels. Fold both ate-api-authentication and ate-api-config into the deployment env-hash so configuration changes trigger a rolling update of Deployment/ate-api-server. Signed-off-by: Mofi Rahman <mofi@google.com>
Mofi Rahman (moficodes)
force-pushed
the
fix/3271-auth-configmap-reconcile-hash
branch
from
October 29, 2026 22:57
a88c65b to
2f4b82b
Compare
Max Thompson (thompsonmax)
approved these changes
Oct 30, 2026
Haven Xia (HavenXia)
approved these changes
Oct 30, 2026
Member
|
[From standup] Here's a more straightforward explanation for reviewer to understand. Tim Hockin (@thockin)
However this need to be in |
Collaborator
|
I did not get to this one yet, but I will either later today or this weekend |
This branch has not been deployed
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.
EnsureAPIServerPrerequisitescreatedConfigMap/ate-api-authenticationandConfigMap/ate-api-configonly when missing (unless--ateapi-log-levelwas passed), ignoring--ateapi-expected-jwt-issueron re-deploy and leaving legacy or unknown1.xrollback fields in place whereate-api-server's strict YAML/prototext loaders wouldCrashLoopBackOff. Additionally,Deployment/ate-api-server'sate.dev/env-hashannotation only digested environment variables rather than the mountedate-api-authenticationandate-api-configConfigMaps.Fixes #3271
Summary
Evidence
ate-setup deploy ate-system --ateapi-expected-jwt-issuer <issuer>skippedConfigMap/ate-api-authentication, and upgrading across schema removals or rolling back1.x -> 1.0.0with unknown fields inauthentication.yamlorapiconfig.textprotoleftate-api-serverinCrashLoopBackOff.jwtProviders, hand-edited log levels) surviveate-setup deployuntouched when flags are unset; explicit flags or invalid/unknown rollback fields rewrite the ConfigMaps cleanly and updateate.dev/env-hash, rollingDeployment/ate-api-servertoReady.Merge Danger
Door: Two-way
Blast Radius: Small (
internal/ateapiauth,internal/apiconfig, andcmd/ate-setupprerequisite reconciliation andate.dev/env-hashcomputation)Rationale
api-servercrashes on any config field it doesn't recognize, andate-setupnever touched those config maps once they existed. the PR makesate-setuprewrite the config maps when the server can't parse it, and keeps valid custom ones.However this need to be in
1.0,0otherwise if1.0.xadds a config field, then someone rollback from1.0.xto1.0.0, the old server will fail the rollback as it cannot parse the yaml.AI use: AI-assisted implementation and unit tests; reviewed and verified by Mofi Rahman (@moficodes) on Kind and GKE.