---

k8s_prometheus_helm__name: "prometheus"
k8s_prometheus_helm__release_namespace: "monitoring"

grafana_admin_username: "grafana-admin"
grafana_admin_password: "grafana-admin"

# https://github.com/grafana/helm-charts
# https://github.com/prometheus-community/helm-charts
k8s_prometheus_helm__release_values:
  prometheus:
    ingress:
      enabled: true
      annotations:
        cert-manager.io/cluster-issuer: letsencrypt-prod
        cert-manager.io/issue-temporary-certificate: "true"
        kubernetes.io/ingress.class: nginx
        nginx.ingress.kubernetes.io/ssl-redirect: "false"
        nginx.ingress.kubernetes.io/whitelist-source-range: "{{ ( ip_whitelist ) | join(',') }}"
      hosts:
        - "{{ stage }}-prometheus.{{ domain }}"
      tls:
        - secretName: "{{ stage }}-prometheus-cert"
          hosts:
            - "{{ stage }}-prometheus.{{ domain }}"
    prometheusSpec:
      # TODO Using PersistentVolumeClaim
      storageSpec: {}
      volumeClaimTemplate:
        spec:
          storageClassName: hcloud-volumes
          accessModes: ["ReadWriteOnce"]
          resources:
            requests:
              storage: 10Gi
        selector: {}
    deploymentStrategy:
      type: Recreate
  alertmanager:
    ingress:
      enabled: true
      annotations:
        cert-manager.io/cluster-issuer: letsencrypt-prod
        cert-manager.io/issue-temporary-certificate: "true"
        kubernetes.io/ingress.class: nginx
        nginx.ingress.kubernetes.io/ssl-redirect: "false"
        nginx.ingress.kubernetes.io/whitelist-source-range: "{{ ( ip_whitelist ) | join(',') }}"
      hosts:
        - "{{ stage }}-alertmanager.{{ domain }}"
      tls:
        - secretName: "{{ stage }}-alertmanager-cert"
          hosts:
            - "{{ stage }}-alertmanager.{{ domain }}"
    deploymentStrategy:
      type: Recreate
  grafana:
    adminUser: "{{ grafana_admin_username }}"
    adminPassword: "{{ grafana_admin_password }}"
    ingress:
      enabled: true
      annotations:
        cert-manager.io/cluster-issuer: letsencrypt-prod
        cert-manager.io/issue-temporary-certificate: "true"
        kubernetes.io/ingress.class: nginx
        nginx.ingress.kubernetes.io/ssl-redirect: "false"
        nginx.ingress.kubernetes.io/whitelist-source-range: "{{ ( ip_whitelist ) | join(',') }}"
      hosts:
        - "{{ stage }}-grafana.{{ domain }}"
      tls:
        - secretName: "{{ stage }}-grafana-cert"
          hosts:
            - "{{ stage }}-grafana.{{ domain }}"
    persistence:
      enabled: true
      size: 10Gi
    deploymentStrategy:
      type: Recreate
  kubeControllerManager:
    service:
      port: 10257
      targetPort: 10257
    serviceMonitor:
      https: true
      insecureSkipVerify: true
