Skip to content

feat(erpc): add deploymentAnnotations for Reloader - #333

Merged
devkoriel merged 1 commit into
mainfrom
fix/erpc-deployment-annotations
Aug 14, 2026
Merged

devkoriel merged 1 commit into
mainfrom
fix/erpc-deployment-annotations

Conversation

@devkoriel

Copy link
Copy Markdown
Contributor

Reloader annotations set on this chart have never worked, and this makes them work.

Problem

Stakater Reloader reads its annotations from the workload metadata (Deployment.metadata.annotations), not from the pod template. The chart only exposed podAnnotations, which renders into spec.template.metadata.annotations, so any reloader annotation set through it is silently ignored and pods never roll when a mounted ConfigMap or Secret changes.

values.yaml actively documented the broken pattern:

podAnnotations: {}
  # configmap.reloader.stakater.com/reload: "erpc-config"

That comment is where the mistake propagated from. Live check on the legacy prod deployment, which sets exactly that:

deploy.metadata.annotations:  []
podTemplate.annotations:      [{"key":"configmap.reloader.stakater.com/reload","value":"erpc-prod-config"}]

So erpc-prod-config changes have never triggered a restart.

This is not theoretical. A Goldsky Edge credential in the new rpcs stack was wrong for weeks; once corrected in Vault, the ExternalSecret synced but the pods kept serving the old value because the key is injected via env[].valueFrom.secretKeyRef, which Kubernetes only resolves at container start. It took a manual rollout restart to take effect.

Change

  • Add deploymentAnnotations, rendered into the Deployment metadata.
  • Move the reloader example off podAnnotations so the documented pattern is the working one.
  • Bump chart 0.6.7 to 0.7.0 (additive, backward compatible), README regenerated.

Verification

With the value set, the annotation lands where Reloader reads it:

kind: Deployment
metadata:
  name: t-erpc
  labels: ...
  annotations:
    secret.reloader.stakater.com/reload: prod-rpcs-provider-api-keys

Unset, the render is byte-identical to before: zero annotation lines at Deployment level, podAnnotations behavior untouched.

Follow-up

A separate app-of-apps PR will set deploymentAnnotations on the rpcs prod and stage apps for *-rpcs-provider-api-keys, and can fix the legacy rpc-nodes apps to move their existing reloader annotation off podAnnotations.

Stakater Reloader reads its annotations from the workload metadata, not
from the pod template. The chart only exposed podAnnotations, which
renders into spec.template.metadata.annotations, so reloader annotations
set through it are silently ignored and pods never roll when a mounted
ConfigMap or Secret changes.

Add deploymentAnnotations, rendered into the Deployment metadata, and
move the reloader example in values.yaml off podAnnotations so the
documented pattern is the working one.
@devkoriel devkoriel self-assigned this Aug 14, 2026
@devkoriel devkoriel added the enhancement New feature or request label Aug 14, 2026
@devkoriel
devkoriel merged commit 0cc023e into main Aug 14, 2026
3 checks passed
@devkoriel
devkoriel deleted the fix/erpc-deployment-annotations branch August 14, 2026 12:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant