2022-08-12 10:20:19 +02:00
|
|
|
{{- if and (or .Values.externalWorkloads.enabled .Values.clustermesh.useAPIServer) .Values.clustermesh.apiserver.tls.auto.enabled (eq .Values.clustermesh.apiserver.tls.auto.method "certmanager") }}
|
|
|
|
---
|
|
|
|
apiVersion: cert-manager.io/v1
|
|
|
|
kind: Certificate
|
|
|
|
metadata:
|
|
|
|
name: clustermesh-apiserver-server-cert
|
|
|
|
namespace: {{ .Release.Namespace }}
|
2023-10-16 19:14:53 +02:00
|
|
|
{{- with .Values.clustermesh.annotations }}
|
|
|
|
annotations:
|
|
|
|
{{- toYaml . | nindent 4 }}
|
|
|
|
{{- end }}
|
2022-08-12 10:20:19 +02:00
|
|
|
spec:
|
|
|
|
issuerRef:
|
2023-10-16 19:14:53 +02:00
|
|
|
{{- toYaml .Values.clustermesh.apiserver.tls.auto.certManagerIssuerRef | nindent 4 }}
|
2022-08-12 10:20:19 +02:00
|
|
|
secretName: clustermesh-apiserver-server-cert
|
|
|
|
commonName: clustermesh-apiserver.cilium.io
|
|
|
|
dnsNames:
|
|
|
|
- clustermesh-apiserver.cilium.io
|
|
|
|
- "*.mesh.cilium.io"
|
2023-10-16 19:14:53 +02:00
|
|
|
- "clustermesh-apiserver.{{ .Release.Namespace }}.svc"
|
2022-08-12 10:20:19 +02:00
|
|
|
{{- range $dns := .Values.clustermesh.apiserver.tls.server.extraDnsNames }}
|
|
|
|
- {{ $dns | quote }}
|
|
|
|
{{- end }}
|
|
|
|
ipAddresses:
|
|
|
|
- "127.0.0.1"
|
|
|
|
- "::1"
|
|
|
|
{{- range $ip := .Values.clustermesh.apiserver.tls.server.extraIpAddresses }}
|
|
|
|
- {{ $ip | quote }}
|
|
|
|
{{- end }}
|
2023-10-16 19:14:53 +02:00
|
|
|
duration: {{ printf "%dh0m0s" (mul .Values.clustermesh.apiserver.tls.auto.certValidityDuration 24) }}
|
2022-08-12 10:20:19 +02:00
|
|
|
{{- end }}
|