rancher-partner-charts/charts/stackstate/stackstate-k8s-agent/1.0.67/templates/secret.yaml

23 lines
749 B
YAML

apiVersion: v1
kind: Secret
metadata:
name: {{ include "stackstate-k8s-agent.fullname" . }}
namespace: {{ .Release.Namespace }}
labels:
{{ include "stackstate-k8s-agent.labels" . | indent 4 }}
type: Opaque
data:
{{- if .Values.global.receiverApiKey }}
sts-api-key: {{ .Values.global.receiverApiKey | b64enc | quote }}
{{- else }}
sts-api-key: {{ .Values.stackstate.apiKey | b64enc | quote }}
{{- end }}
{{- if .Values.stackstate.cluster.authToken }}
sts-cluster-auth-token: {{ .Values.stackstate.cluster.authToken | b64enc | quote }}
{{- else }}
sts-cluster-auth-token: {{ randAlphaNum 32 | b64enc | quote }}
{{- end }}
{{- range $key, $value := .Values.global.extraEnv.secret }}
{{ $key }}: {{ $value | b64enc | quote }}
{{- end }}