secret.yaml 508 B

12345678910111213141516
  1. {{- $clusterId := uuidv4 | replace "-" "" | trunc 22 }}
  2. {{- if .Values.clusterId }}{{ $clusterId = .Values.clusterId }}{{ end }}
  3. apiVersion: v1
  4. kind: Secret
  5. metadata:
  6. name: {{ include "kafka.clusterId.SecretName" . }}
  7. labels:
  8. {{- include "kafka.labels" . | nindent 4 }}
  9. {{- if not .Values.clusterId }}
  10. annotations:
  11. "helm.sh/hook": "pre-install"
  12. "helm.sh/hook-delete-policy": "before-hook-creation,hook-failed"
  13. {{- end }}
  14. type: Opaque
  15. data:
  16. clusterId: {{ $clusterId | b64enc | quote }}