diff --git a/k8s/apps/ingresses/templates/clusterissuer.yaml b/k8s/apps/ingresses/templates/clusterissuer.yaml index 93a2113..c97e213 100644 --- a/k8s/apps/ingresses/templates/clusterissuer.yaml +++ b/k8s/apps/ingresses/templates/clusterissuer.yaml @@ -35,45 +35,20 @@ spec: apiTokenSecretRef: name: {{ .Values.cloudflare.tokenSecretName }} key: {{ .Values.cloudflare.tokenSecretKey }} +{{ range $prefix := .Values.cloudflare.certificateRootDomains }} --- apiVersion: cert-manager.io/v1 kind: Certificate metadata: - name: cloudflare-wildcard.{{ .Values.global.domain }} + name: cloudflare-wildcard{{$prefix}}.{{ $.Values.global.domain }} spec: - secretName: cloudflare-wildcard.{{ .Values.global.domain }} + secretName: cloudflare-wildcard{{$prefix}}.{{ $.Values.global.domain }} issuerRef: name: cloudflare kind: Issuer - commonName: '*.{{ .Values.global.domain }}' + commonName: '*{{$prefix}}.{{ $.Values.global.domain }}' dnsNames: - - "*.{{ .Values.global.domain }}" ---- -apiVersion: cert-manager.io/v1 -kind: Certificate -metadata: - name: cloudflare-wildcard.core.{{ .Values.global.domain }} -spec: - secretName: cloudflare-wildcard.core.{{ .Values.global.domain }} - issuerRef: - name: cloudflare - kind: Issuer - commonName: '*.core.{{ .Values.global.domain }}' - dnsNames: - - "*.core.{{ .Values.global.domain }}" ---- -apiVersion: cert-manager.io/v1 -kind: Certificate -metadata: - name: cloudflare-wildcard.vh.{{ .Values.global.domain }} -spec: - secretName: cloudflare-wildcard.vh.{{ .Values.global.domain }} - issuerRef: - name: cloudflare - kind: Issuer - commonName: '*.vh.{{ .Values.global.domain }}' - dnsNames: - - "*.vh.{{ .Values.global.domain }}" - + - "*{{$prefix}}.{{ $.Values.global.domain }}" +{{ end }} {{ end }} {{ end }} \ No newline at end of file diff --git a/k8s/apps/ingresses/values-prod.yaml b/k8s/apps/ingresses/values-prod.yaml index 1aa2a98..868715c 100644 --- a/k8s/apps/ingresses/values-prod.yaml +++ b/k8s/apps/ingresses/values-prod.yaml @@ -1,3 +1,6 @@ +global: + tls: + enabled: true reverseProxy: castle: ip: "192.168.0.23" @@ -17,4 +20,5 @@ reverseProxy: overrides: icon: https://basement.home.sosnovsky.ca/static/icons/favicon.ico - \ No newline at end of file +cloudflare: + enabled: true \ No newline at end of file diff --git a/k8s/apps/ingresses/values.yaml b/k8s/apps/ingresses/values.yaml index 551f30f..74f98c1 100644 --- a/k8s/apps/ingresses/values.yaml +++ b/k8s/apps/ingresses/values.yaml @@ -18,3 +18,8 @@ cloudflare: enabled: false tokenSecretName: ~ tokenSecretKey: ~ + certificateRootDomains: + - "" + - ".core" + - ".vh" + - ".wa" \ No newline at end of file