-
Notifications
You must be signed in to change notification settings - Fork 2.8k
/
server-secret.yaml
31 lines (31 loc) · 1.14 KB
/
server-secret.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
{{- 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 }}
{{- with .Values.clustermesh.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
issuerRef:
{{- toYaml .Values.clustermesh.apiserver.tls.auto.certManagerIssuerRef | nindent 4 }}
secretName: clustermesh-apiserver-server-cert
commonName: clustermesh-apiserver.cilium.io
dnsNames:
- clustermesh-apiserver.cilium.io
- "*.mesh.cilium.io"
- "clustermesh-apiserver.{{ .Release.Namespace }}.svc"
{{- 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 }}
duration: {{ printf "%dh0m0s" (mul .Values.clustermesh.apiserver.tls.auto.certValidityDuration 24) }}
{{- end }}