kind: Ingress
{{- if .Capabilities.APIVersions.Has "networking.k8s.io/v1beta1" }}
apiVersion: networking.k8s.io/v1beta1
{{- else }}
apiVersion: extensions/v1beta1
{{- end }}

metadata:
  name: keppel-api
  annotations:
    vice-president: "true"
    disco: "true"

spec:
  tls:
    - secretName: tls-keppel-api
      hosts: [ keppel.{{ .Values.global.region }}.{{ .Values.global.tld }} ]
  rules:
    - host: keppel.{{ .Values.global.region }}.{{ .Values.global.tld }}
      http:
        paths:
          - path: /
            backend:
              serviceName: keppel-api
              servicePort: 80

kind: Ingress
{{- if .Capabilities.APIVersions.Has "networking.k8s.io/v1beta1" }}
apiVersion: networking.k8s.io/v1beta1
{{- else }}
apiVersion: extensions/v1beta1
{{- end }}

metadata:
  name: keppel-api
  annotations:
    vice-president: "true"
    disco: "true"

spec:
  tls:
    - secretName: tls-keppel-api
      hosts: [ keppel.{{ .Values.global.region }}.{{ .Values.global.tld }}
      {{- range $index, $san := .Values.keppel.sans }}, {{ $san }}{{ end }} ]
  rules:
    - host: keppel.{{ .Values.global.region }}.{{ .Values.global.tld }}
      http:
        paths:
          - path: /
            backend:
              serviceName: keppel-api
              servicePort: 80

Allow SANs for generated SSL certs
Allow SANs for generated SSL certs
