apiVersion: v1
kind: Secret
metadata:
  name: values
  namespace:  {{ .Release.Namespace }}
type: generic
stringData:
  values.yaml: |
{{ toYaml .Values | indent 4}}
  argocd.yaml: |
{{ toYaml .Values.addons.argocd.values | indent 4 }}
  istiooperator.yaml: |
{{ toYaml .Values.istiooperator.values | indent 4  }}
  authservice.yaml: | 
    chains:
    {{- if .Values.addons.authservice.chains }}
      {{ .Values.addons.authservice.chains | toYaml | nindent 6 }}
    {{- end }}
      kiali:
        client_secret: "{{ .Values.istio.sso.kiali.client_secret }}"
      jaeger:
        client_secret: "{{ .Values.istio.sso.jaeger.client_secret }}"
      prometheus:
        client_secret: "{{ .Values.monitoring.sso.prometheus.client_secret }}"
      alertmanager:
        client_secret: "{{ .Values.monitoring.sso.alertmanager.client_secret }}"
{{ if .Values.addons.authservice.values }}
{{ toYaml .Values.addons.authservice.values | indent 4 }}
{{- end }}
  istio.yaml: |
{{ toYaml .Values.istio.values | indent 4  }}
  gatekeeper.yaml: |
{{ toYaml .Values.gatekeeper.values | indent 4 }}
  gitlab-runner.yaml: |
{{ toYaml .Values.addons.gitlabRunner.values | indent 4 }}
  fluentbit.yaml: |
{{ toYaml .Values.fluentbit.values | indent 4 }}
  eckoperator.yaml: |
{{ toYaml .Values.eckoperator.values | indent 4 }}
  logging.yaml: |
{{ toYaml .Values.logging.values | indent 4 }}
  monitoring.yaml: |
    grafana_client_id: {{ .Values.monitoring.sso.grafana.client_id | quote }}
    grafana_client_secret: {{ .Values.monitoring.sso.grafana.client_secret | quote }}
{{ if .Values.monitoring.values }}
{{ toYaml .Values.monitoring.values | indent 4 }}
{{- end }}
  twistlock.yaml: |
{{ toYaml .Values.twistlock.values | indent 4 }} 
  clusterauditor.yaml: |
{{ toYaml .Values.twistlock.values | indent 4 }}
  miniooperator.yaml: |
{{ toYaml .Values.minio.miniooperator.values | indent 4 }}
  minio.yaml: |
{{ toYaml .Values.minio.minioinstance.values | indent 4 }}
  gitlab.yaml: |
{{ toYaml .Values.addons.gitlab.values | indent 4 }}
  anchore.yaml: |
{{ toYaml .Values.addons.anchore.values | indent 4 }}
  sonarqube.yaml: |
{{ toYaml .Values.addons.sonarqube.values | indent 4 }}
  mattermostoperator.yaml: |
{{ toYaml .Values.addons.mattermostoperator.values | indent 4 }}
data:
