#29507·vault

Agent re-renders dynamic secrets when static secrets are present

Author: trevorackermanCreated Feb 5, 2025Updated Sep 23, 2026
Labelsbugagentk8s

Describe the bug We have an application that's injected with the agent sidecar in Kubernetes. Our annotations include BOTH static secret from KV and a dynamic secret to get creds from AWS. The default setting of 5 minutes for static secret rendering is triggering the agent to also re-render dynamic secrets before their lease expiration.

https://developer.hashicorp.com/vault/docs/agent-and-proxy/agent/template#static_secret_render_interval

This behavior wasn't obvious until turning up the logging level of the agent to TRACE. When there are no static secrets injected on the deployment, this behavior does not occur.

To Reproduce Steps to reproduce the behavior:

  1. Add annotations to a kubernetes deployment to inject a static secret from Vault
  2. Add annotations to the same kubernetes deployment to inject a dynamic secret from Vault (e.g. for AWS creds)
  3. Observe the logs from the vault agent and verify messages about rendering the dynamic secrets about once per 5 minutes.

Expected behavior Rendering dynamic secrets are not rendered when the static secret interval expires.

Environment:

  • Vault Server Version (retrieve with vault status): 1.14.10
  • Vault CLI Version (retrieve with vault version): 1.14.10
  • Server Operating System/Architecture:

Vault server configuration file(s):

hcl
# Paste your Vault config here.
# Be sure to scrub any sensitive values

Additional context Add any other context about the problem here.

This seems very similar to https://github.com/hashicorp/vault/issues/20006