{{- if .Values.osccost.secret.enable }} {{ $root := . }} {{- with .Values.osccost.secret }} apiVersion: v1 kind: Secret metadata: annotations: {{- range $key,$val := .annotations }} {{ $key }}: {{ $val | quote }} {{- end }} labels: app.kubernetes.io/name: "{{ $root.Release.Name }}" helm.sh/chart: {{ $root.Chart.Name }}-{{ $root.Chart.Version }} app.kubernetes.io/managed-by: {{ $root.Release.Service }} app.kubernetes.io/instance: {{ template "osccost.fullname" $root }} app.kubernetes.io/part-of: {{ $root.Release.Name }} name: {{ template "osccost.secret" $root }} namespace: {{ $root.Release.Namespace }} type: Opaque data: OSC_ACCESS_KEY: {{ .oscAccessKey | b64enc | quote }} OSC_SECRET_KEY: {{ .oscSecretKey | b64enc | quote }} OSC_REGION: {{ .oscRegion | b64enc | quote }} {{- end }} {{- end }}