rancher-partner-charts/charts/instana/instana-agent/1.2.73/templates/secrets.yaml

56 lines
1.5 KiB
YAML

{{- if not (typeIs "[]interface {}" .Values.agent.image.pullSecrets) }}
{{- if .Values.agent.image.name | hasPrefix "containers.instana.io" }}
---
apiVersion: v1
kind: Secret
metadata:
name: containers-instana-io
namespace: {{ .Release.Namespace }}
labels:
{{- include "instana-agent.commonLabels" . | nindent 4 }}
type: kubernetes.io/dockerconfigjson
data:
.dockerconfigjson: {{ template "imagePullSecretContainersInstanaIo" . }}
{{- end -}}
{{- end -}}
{{- if not .Values.agent.keysSecret }}
---
apiVersion: v1
kind: Secret
metadata:
name: {{ template "instana-agent.fullname" . }}
namespace: {{ .Release.Namespace }}
labels:
{{- include "instana-agent.commonLabels" . | nindent 4 }}
type: Opaque
data:
{{- if .Values.templating }}
key: {{ .Values.agent.key }}
downloadKey: {{ default "''" .Values.agent.downloadKey }}
{{- else }}
{{- if .Values.agent.key }}
key: {{ .Values.agent.key | b64enc | quote }}
{{- end }}
{{- if .Values.agent.downloadKey }}
downloadKey: {{ .Values.agent.downloadKey | b64enc | quote }}
{{- end }}
{{- end }}
{{- end }}
{{- if .Values.agent.tls }}
{{- if and (not .Values.agent.tls.secretName) (and .Values.agent.tls.certificate .Values.agent.tls.key) }}
---
apiVersion: v1
kind: Secret
metadata:
name: {{ template "instana-agent.fullname" . }}-tls
namespace: {{ .Release.Namespace }}
labels:
{{- include "instana-agent.commonLabels" . | nindent 4 }}
type: kubernetes.io/tls
data:
tls.crt: {{ .Values.agent.tls.certificate }}
tls.key: {{ .Values.agent.tls.key }}
{{- end }}
{{- end }}