fix(dgraph): remove the dead tls.annotations block from Secret templates - #142
Conversation
| namespace: {{ include "dgraph.namespace" . }} | ||
| labels: | ||
| {{- include "dgraph.labels" (dict "ctx" . "component" .Values.backups.name) | nindent 4 }} | ||
| {{- with .Values.alpha.tls.annotations }} |
There was a problem hiding this comment.
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.
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.