Skip to content

feat(chart): add relay.deploymentAnnotations for Reloader support#2021

Open
torstenrudolf wants to merge 1 commit into
block:mainfrom
torstenrudolf:trudolf/chart-deployment-annotations
Open

feat(chart): add relay.deploymentAnnotations for Reloader support#2021
torstenrudolf wants to merge 1 commit into
block:mainfrom
torstenrudolf:trudolf/chart-deployment-annotations

Conversation

@torstenrudolf

@torstenrudolf torstenrudolf commented Jul 17, 2026

Copy link
Copy Markdown

What

Adds a relay.deploymentAnnotations values knob (default {}) to the Buzz relay chart, rendered onto the relay Deployment's own metadata.annotations. Bumps the chart to 0.1.4.

Why

The chart only exposed pod-template annotations (relay.podAnnotations). Stakater Reloader reads its trigger annotations (secret.reloader.stakater.com/reload, reloader.stakater.com/auto) from the Deployment's metadata.annotations, not the pod template — so there was no way to opt a deployment into auto-rolling when a Secret changes.

This matters when DB/Redis credentials come from a Secret injected as pod env vars: env vars are read once at process start, so if the backing Secret is later updated (e.g. a credential rotation), running pods keep the stale value and can fail auth until they are manually rolled. The chart's existing checksum/secret pod annotation only tracks the chart-managed Secret, so it doesn't cover externally-managed Secrets.

With this knob a consumer can set:

relay:
  deploymentAnnotations:
    secret.reloader.stakater.com/reload: <secret-name>

and Reloader will auto-roll the pods when that Secret changes (requires the Reloader controller running in-cluster).

Rendered output

kind: Deployment
metadata:
  name: t-buzz
  labels:
    ...
  annotations:
    secret.reloader.stakater.com/reload: <secret-name>
spec:
  ...

Default (unset) renders no annotations block — no behavior change for existing consumers.

Testing

  • helm lint clean.
  • helm template verified both cases: default emits no Deployment-level annotations; with the value set, the annotation lands at Deployment.metadata.annotations (where Reloader reads it), not the pod template.

Follow-ups (downstream, not in this PR)

  • Publish 0.1.4 to the OCI chart repo, then bump the dep + set the annotation in consumer values.
  • Requires the Reloader controller to be installed in the target cluster for the annotation to take effect.

The relay chart only exposed pod-template annotations (relay.podAnnotations).
Stakater Reloader reads its trigger annotations
(secret.reloader.stakater.com/reload / reloader.stakater.com/auto) from the
Deployment's own metadata.annotations, so there was no way to opt a deployment
into auto-rolling on Secret rotation.

This bites in production: DB/Redis creds come from an ExternalSecret injected
as pod env vars, which freeze at pod start. When RDS rotates the password, ESO
updates the Secret but running pods keep the stale creds and fail DB auth until
a manual rollout — exactly the bb-public relay outage on 2026-07-17.

Add a relay.deploymentAnnotations knob (default {}) rendered onto the relay
Deployment's metadata.annotations. Consumers can then set
secret.reloader.stakater.com/reload: <secret> to auto-roll on rotation
(requires the Reloader controller in-cluster). Bump chart to 0.1.4.

Signed-off-by: Torsten Rudolf <trudolf@squareup.com>
@torstenrudolf
torstenrudolf requested a review from a team as a code owner July 17, 2026 04:17
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