Skip to content

[k8s-keystone-auth] Preserve config after failed reload - #3159

Open
immanuwell wants to merge 1 commit into
kubernetes:masterfrom
immanuwell:fix/keystone-configmap-reload
Open

[k8s-keystone-auth] Preserve config after failed reload#3159
immanuwell wants to merge 1 commit into
kubernetes:masterfrom
immanuwell:fix/keystone-configmap-reload

Conversation

@immanuwell

@immanuwell immanuwell commented Aug 9, 2026

Copy link
Copy Markdown
Contributor

What this PR does / why we need it:

A malformed live policy or sync ConfigMap logs a parse error, but still replaces working config with empty or partial state
As a result, auth can start denying requests or syncing can silently stop

This keeps the last good config when parsing or validation fails. Valid reloads still work, and failures use the existing retry queue.

Which issue this PR fixes(if applicable):

N/A

Special notes for reviewers:

Repro:

  1. Start with a valid policy or sync ConfigMap.
  2. Set policies to {, or set syncConfig to malformed YAML.
  3. Current code logs the parse failure, then logs that config was updated and replaces the active state.

Tests:

go test -race ./pkg/identity/keystone

go test ./pkg/...

make check

Release note:

NONE

@kubernetes-prow kubernetes-prow Bot added the release-note-none Denotes a PR that doesn't merit a release note. label Aug 9, 2026
@kubernetes-prow
kubernetes-prow Bot requested a review from kayrus August 9, 2026 09:24
@kubernetes-prow

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign kayrus for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@kubernetes-prow
kubernetes-prow Bot requested a review from stephenfin August 9, 2026 09:24
@kubernetes-prow kubernetes-prow Bot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Aug 9, 2026
@kubernetes-prow

Copy link
Copy Markdown
Contributor

Hi @immanuwell. Thanks for your PR.

I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work.

Tip

We noticed you've done this a few times! Consider joining the org to skip this step and gain /lgtm and other bot rights. We recommend asking approvers on your previous PRs to sponsor you.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@kubernetes-prow kubernetes-prow Bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Aug 9, 2026
@immanuwell
immanuwell force-pushed the fix/keystone-configmap-reload branch from 41e19dd to 300b187 Compare August 9, 2026 09:25
@immanuwell
immanuwell force-pushed the fix/keystone-configmap-reload branch from 300b187 to 0d533d5 Compare August 9, 2026 09:25
@kubernetes-prow kubernetes-prow Bot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Aug 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. release-note-none Denotes a PR that doesn't merit a release note. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant