# helm_charts_server-secret.yaml
{{- if and (.Values.server.enabled) (not .Values.server.tlsSecret) -}}
kind: Secret
apiVersion: v1
metadata:
  name: {{ template "kiam.fullname" . }}-server
type: Opaque
data:
{{- if .Values.server.tlsFiles.ca }}
{{ toYaml .Values.server.tlsFiles | indent 2 }}
{{- else }}
{{ include "kiam.server.gen-certs" . | indent 2 }}
{{- end -}}
{{- end }}