Skip to content

The Kubernetes credential provider reloads its namespace policy without a restart - #2959

Open
Quentin Bisson (QuentinBisson) wants to merge 2 commits into
agent-substrate:mainfrom
QuentinBisson:credential-provider-policy-reload
Open

Quentin Bisson (QuentinBisson) wants to merge 2 commits into
agent-substrate:mainfrom
QuentinBisson:credential-provider-policy-reload

Conversation

@QuentinBisson

Copy link
Copy Markdown
Contributor

Reloading the policy without a restart came up in review on #2877. The provider read its namespace policy once at startup, so every policy edit needed a rollout restart. It now rereads the file when it changes; a file that fails to load is logged and the last good policy stays in force, shown on /statusz.

Part of #2876

AI use: AI-assisted, Claude Code wrote the change and tests; I review it before marking it ready.

  • Tests pass
  • Docs updated

The Kubernetes secrets provider read its namespace policy once at startup,
so every policy edit needed a provider restart. It now rereads the file when
its stat changes, which a ConfigMap volume update always causes. A file that
fails to load is logged and leaves the last good policy in force, and
/statusz shows the error. A malformed file still fails startup.
…ge through one path

LoadNamespaceAuthorizer now runs the same stat-and-parse as a reload, and
policy returns the load error with the grants. The reload test swaps a
..data symlink as the kubelet does, so it fails if the stat stops
following the link.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant