Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ---
- {{ if .Values.alias }}
- apiVersion: certmanager.k8s.io/v1alpha1
- kind: Certificate
- metadata:
- name: alias-cert-{{ .Release.Namespace }}
- spec:
- secretName: alias-lets-encrypt-tls
- issuerRef:
- name: {{ .Values.letsEncryptEnvironment }}
- kind: ClusterIssuer
- dnsNames:
- {{- range .Values.alias }}
- - {{ . }}
- {{- end }}
- acme:
- config:
- - http01:
- ingressClass: nginx
- domains:
- {{- range .Values.alias }}
- - {{ . }}
- {{- end }}
- issuerRef:
- name: letsencrypt-staging
- kind: ClusterIssuer
- {{- end }}
- ---
- # This apply the current context "." to $root
- # We need this to access the .Values in the range function
- # The range function sets the current context
- {{- $root := . -}}
- {{- range .Values.alias }}
- kind: Ingress
- apiVersion: extensions/v1beta1
- metadata:
- name: alias-{{ . | lower | replace "." "-"}}
- labels:
- app: fpmpool
- {{- include "standard_labels" $| indent 4 }}
- {{- include "installation_info" $| indent 4 }}
- annotations:
- certmanager.k8s.io/cluster-issuer: letsencrypt-staging
- spec:
- tls:
- - secretName: alias-lets-encrypt-tls
- hosts:
- - {{ . }}
- rules:
- - host: {{ . }}
- http:
- paths:
- - backend:
- serviceName: {{ $root.Values.ingressBackendServiceName }}
- servicePort: {{ $root.Values.ingressBackendServicePort }}
- ---
- {{- end }}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement