Skip to content

Comments

[ENG-8736] Fix: quote .Release.Name in Helm label values to prevent YAML int coercion#3592

Merged
FabianKramm merged 1 commit intomainfrom
vibepod/ENG-8736
Feb 20, 2026
Merged

[ENG-8736] Fix: quote .Release.Name in Helm label values to prevent YAML int coercion#3592
FabianKramm merged 1 commit intomainfrom
vibepod/ENG-8736

Conversation

@pascalbreuninger
Copy link
Member

Summary

  • Adds | quote pipeline to all standalone .Release.Name usages in release: and vcluster.loft.sh/managed-by: label values across 6 Helm template files
  • Prevents YAML parsers from interpreting a numeric release name as an integer

Problem

When the Helm release name is a purely numeric string (e.g. 1), YAML parsers interpret unquoted label values as integers rather than strings. The vCluster binary calls yaml.UnmarshalStrict on the rendered config.yaml and fails with a type-mismatch error, causing the pod to crash-loop.

Changes

Added | quote to release: {{ .Release.Name }} and vcluster.loft.sh/managed-by: {{ .Release.Name }} label values in:

  • chart/templates/statefulset.yaml (2 occurrences)
  • chart/templates/service.yaml (1 occurrence)
  • chart/templates/networkpolicy.yaml (7 release: + 6 managed-by: = 13 occurrences)
  • chart/templates/etcd-statefulset.yaml (2 occurrences)
  • chart/templates/etcd-service.yaml (1 occurrence)
  • chart/templates/pod-disruption-budget.yaml (1 occurrence)

name: fields and embedded forms like vc-config-{{ .Release.Name }} are intentionally unchanged (they are already strings by context or embedding).

Related

Test plan

  • go build -mod vendor ./cmd/vclusterctl/ passes
  • helm lint chart passes (1 chart linted, 0 failed)

Generated by pascal.breuninger (🤖) (VibePod). Review carefully before merging.

…oercion

When the Helm release name is a purely numeric string (e.g. "1"), YAML
parsers interpret unquoted label values as integers rather than strings.
This causes yaml.UnmarshalStrict to fail with a type-mismatch error in
the vCluster pod at startup.

Add the `quote` pipeline function to all `release:` and
`vcluster.loft.sh/managed-by:` label values that use .Release.Name
directly as a standalone value in:
- chart/templates/statefulset.yaml
- chart/templates/service.yaml
- chart/templates/networkpolicy.yaml
- chart/templates/etcd-statefulset.yaml
- chart/templates/etcd-service.yaml
- chart/templates/pod-disruption-budget.yaml

Resolves ENG-8736

Co-Authored-By: pascal.breuninger (🤖) <noreply@loft.sh>
@pascalbreuninger pascalbreuninger requested a review from a team as a code owner February 19, 2026 15:11
@FabianKramm FabianKramm merged commit e7b04ea into main Feb 20, 2026
38 checks passed
@FabianKramm FabianKramm deleted the vibepod/ENG-8736 branch February 20, 2026 09:06
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.

2 participants