45 lines
1.7 KiB
YAML
45 lines
1.7 KiB
YAML
{{- if and .Values.tls.enabled .Values.tls.certs.certManager }}
|
|
apiVersion: cert-manager.io/v1
|
|
kind: Certificate
|
|
metadata:
|
|
name: {{ template "cockroachdb.fullname" . }}-node
|
|
namespace: {{ .Release.Namespace | quote }}
|
|
labels:
|
|
helm.sh/chart: {{ template "cockroachdb.chart" . }}
|
|
app.kubernetes.io/name: {{ template "cockroachdb.name" . }}
|
|
app.kubernetes.io/instance: {{ .Release.Name | quote }}
|
|
app.kubernetes.io/managed-by: {{ .Release.Service | quote }}
|
|
{{- with .Values.labels }}
|
|
{{- toYaml . | nindent 4 }}
|
|
{{- end }}
|
|
spec:
|
|
duration: {{ .Values.tls.certs.certManagerIssuer.nodeCertDuration }}
|
|
renewBefore: {{ .Values.tls.certs.certManagerIssuer.nodeCertExpiryWindow }}
|
|
usages:
|
|
- digital signature
|
|
- key encipherment
|
|
- server auth
|
|
- client auth
|
|
privateKey:
|
|
algorithm: RSA
|
|
size: 2048
|
|
commonName: node
|
|
subject:
|
|
organizations:
|
|
- Cockroach
|
|
dnsNames:
|
|
- "localhost"
|
|
- "127.0.0.1"
|
|
- {{ printf "%s-public" (include "cockroachdb.fullname" .) | quote }}
|
|
- {{ printf "%s-public.%s" (include "cockroachdb.fullname" .) .Release.Namespace | quote }}
|
|
- {{ printf "%s-public.%s.svc.%s" (include "cockroachdb.fullname" .) .Release.Namespace .Values.clusterDomain | quote }}
|
|
- {{ printf "*.%s" (include "cockroachdb.fullname" .) | quote }}
|
|
- {{ printf "*.%s.%s" (include "cockroachdb.fullname" .) .Release.Namespace | quote }}
|
|
- {{ printf "*.%s.%s.svc.%s" (include "cockroachdb.fullname" .) .Release.Namespace .Values.clusterDomain | quote }}
|
|
secretName: {{ .Values.tls.certs.nodeSecret }}
|
|
issuerRef:
|
|
name: {{ template "cockroachdb.fullname" . }}-ca-issuer
|
|
kind: Issuer
|
|
group: cert-manager.io
|
|
{{- end }}
|