- name: argo-cd-ingress
  namespace: cicd
  create_namespace: true
  chart_ref: {{ .Modules.Cicd.ArgoCd.ServiceIngress.ChartRef }}
  chart_version: {{ .Modules.Cicd.ArgoCd.ServiceIngress.ChartVersion }}
  {{- if and .Modules.Cicd.Enabled (eq .Modules.Cicd.ArgoCd.Expose.Type "ingress") }}
  release_state: "present"
  {{- else }}
  release_state: "absent"
  {{- end }}
  values:
    services:
      - domain: {{ .Modules.Cicd.ArgoCd.Expose.Domain }}
        path: {{ .Modules.Cicd.ArgoCd.Expose.Path }}
        address: argo-cd-argocd-server
        port: 80
        secretName: argo-cd-server-tls

    ingress:
      accountEmail: {{ .Modules.Additional.CertManager.AccountEmail }}
      class: {{ .Modules.Additional.Ingress.Type }}
      annotations:
        {{- if eq .Modules.Additional.Ingress.Type "nginx" }}
        nginx.ingress.kubernetes.io/proxy-buffer-size: "128k"
        nginx.ingress.kubernetes.io/proxy-buffers: "4 256k"
        nginx.ingress.kubernetes.io/proxy-busy-buffers-size: "256k"
        nginx.ingress.kubernetes.io/proxy-body-size: "0"
        {{- end }}
      tls:
        enabled: {{ .Modules.Cicd.ArgoCd.Expose.Tls.Enabled }}
        useCertManager: true

        # used if "useCertManager" is false
        crt: ""
        key: ""
