{{- $clusterId := uuidv4 | replace "-" "" | trunc 22 }} {{- if .Values.clusterId }}{{ $clusterId = .Values.clusterId }}{{ end }} apiVersion: v1 kind: Secret metadata: name: {{ include "kafka.clusterId.SecretName" . }} labels: {{- include "kafka.labels" . | nindent 4 }} {{- if not .Values.clusterId }} annotations: "helm.sh/hook": "pre-install" "helm.sh/hook-delete-policy": "before-hook-creation,hook-failed" {{- end }} type: Opaque data: clusterId: {{ $clusterId | b64enc | quote }}