Skip to content

fix(dgraph): remove the dead tls.annotations block from Secret templates - #142

Merged
matthewmcneely merged 1 commit into
mainfrom
fix-secret-dead-tls-annotations
Aug 13, 2026
Merged

fix(dgraph): remove the dead tls.annotations block from Secret templates#142
matthewmcneely merged 1 commit into
mainfrom
fix-secret-dead-tls-annotations

Conversation

@mlwelles

Copy link
Copy Markdown
Contributor

The ACL, encryption, and TLS Secret templates stamped {{ with .Values.*.tls.annotations }}, a key defined nowhere in values.yaml — dead code copied from the TLS secret. Removed from all five Secret templates (alpha secret-acl/enc/tls, zero secret-tls, backups secret). The rendered Secrets are unchanged.

Part of splitting #140 into per-area PRs. The change was built and validated on that branch; the merge of all split PRs reproduces #140's tree byte-for-byte. #140 is being closed as superseded.

namespace: {{ include "dgraph.namespace" . }}
labels:
{{- include "dgraph.labels" (dict "ctx" . "component" .Values.backups.name) | nindent 4 }}
{{- with .Values.alpha.tls.annotations }}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right call on the removal — a backups Secret reaching into alpha.tls is obviously copy-paste. One correction on the framing though: it isn't strictly dead. Helm merges user-supplied values into .Values whether or not the key exists in values.yaml, so anyone who set alpha.tls.annotations in their own values file has been getting working annotations on all four of these Secrets. I confirmed it: with the key set, main renders them and this branch drops them.

Undocumented rather than dead, in other words. Still fine to remove, but it needs a line in #154. Secret annotations are load-bearing in a way Service annotations usually aren't (helm.sh/resource-policy: keep, sealed-secrets, reloader.stakater.com/match), and silently dropping resource-policy: keep on upgrade means a Secret the user expected to survive uninstall no longer does.

@matthewmcneely
matthewmcneely merged commit d8d019e into main Aug 13, 2026
@matthewmcneely
matthewmcneely deleted the fix-secret-dead-tls-annotations branch August 13, 2026 20:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants