github.com/lrills/helm@v2.8.1+incompatible/docs/examples/nginx/templates/pre-install-secret.yaml (about)

     1  # This shows a secret as a pre-install hook.
     2  # A pre-install hook is run before the rest of the chart is loaded.
     3  apiVersion: v1
     4  kind: Secret
     5  metadata:
     6    name: {{ template "nginx.fullname" . }}
     7    labels:
     8      heritage: {{ .Release.Service }}
     9      release: {{ .Release.Name }}
    10      chart: {{ .Chart.Name }}-{{ .Chart.Version }}
    11      app: {{ template "nginx.name" . }}
    12    # This declares the resource to be a hook. By convention, we also name the
    13    # file "pre-install-XXX.yaml", but Helm itself doesn't care about file names.
    14    annotations:
    15      "helm.sh/hook": pre-install
    16  type: Opaque
    17  data:
    18    password: {{ b64enc "secret" }}
    19    username: {{ b64enc "user1" }}