{{- if and (.Values.agent.enabled) (not .Values.agent.tlsSecret) -}}
kind: Secret
apiVersion: v1
metadata:
  name: {{ template "kiam.fullname" . }}-agent
type: Opaque
data:
{{ toYaml .Values.agent.tlsFiles | indent 2 }}
{{- end }}
