ITADN

helm.kubebuilder.io/v2-alpha > 4.11.1 breaks secretRef names

#5622Opennicfit 创建于 2026-04-14
kind/bugkind/regression
N
nicfitcommented
### What broke? What's expected? Given this kustomization secretGenerator: ```yaml secretGenerator: - literals: - PASSWORD=mock-password name: manager-secrets options: disableNameSuffixHash: true ``` When running `kubebuilder edit --plugins=helm.kubebuilder.io/v2-alpha --force` v4.11.1 The helm Secret produced is: ```yaml apiVersion: v1 data: PASSWORD: bW9ja3Bhc3N3b3JkCg kind: Secret metadata: labels: app.kubernetes.io/managed-by: {{ .Release.Service }} name: {{ include "ci-accounts-operator.resourceName" (dict "suffix" "manager-secrets" "context" $) }} namespace: {{ .Release.Namespace }} type: Opaque ``` And the `secretRef`matches this name. But versions > 4.11.1 output a different secretRef. Note this diff: ```diff envFrom: - secretRef: - name: {{ include "ci-accounts-operator.resourceName" (dict "suffix" "manager-secrets" "context" $) }} + name: ciao-manager-secrets ``` Fortunately the problem does NOT happen to the configMap, its helm name is preserved: ```yaml volumes: - configMap: name: {{ include "ci-accounts-operator.resourceName" (dict "suffix" "manager-config" "context" $) }} name: manager-config ``` ### Reproducing this issue All versions > 4.11.1 change the secretRef name leading to "Secret not found" ### KubeBuilder (CLI) Version 4.11.1 (good), 4.12, 4.13.1 (bad) ### PROJECT version 3 ### Plugin versions ```yaml - go.kubebuilder.io/v4 plugins: helm.kubebuilder.io/v2-alpha: manifests: dist/install.yaml output: helm ``` ### Other versions go 1.26.1 sigs.k8s.io/controller-runtime v0.23.3 kubectl version Client Version: v1.35.3 Kustomize Version: v5.7.1 Server Version: v1.35.0 ### Extra Labels /kind regression
0 条评论