rancher-partner-charts/charts/cockroach-labs/cockroachdb/11.1.3/templates/certificate.client.yaml

49 lines
1.4 KiB
YAML
Raw Normal View History

2022-10-26 08:01:31 +00:00
{{- if and .Values.tls.enabled .Values.tls.certs.certManager }}
{{- if .Values.tls.certs.useCertManagerV1CRDs }}
2022-10-26 08:01:31 +00:00
apiVersion: cert-manager.io/v1
{{- else }}
apiVersion: cert-manager.io/v1alpha2
{{- end }}
2022-10-26 08:01:31 +00:00
kind: Certificate
metadata:
name: {{ template "cockroachdb.fullname" . }}-root-client
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.clientCertDuration }}
renewBefore: {{ .Values.tls.certs.certManagerIssuer.clientCertExpiryWindow }}
usages:
- digital signature
- key encipherment
- client auth
{{- if .Values.tls.certs.useCertManagerV1CRDs }}
2022-10-26 08:01:31 +00:00
privateKey:
algorithm: RSA
size: 2048
{{- else }}
keySize: 2048
keyAlgorithm: rsa
{{- end }}
2022-10-26 08:01:31 +00:00
commonName: root
{{- if .Values.tls.certs.useCertManagerV1CRDs }}
2022-10-26 08:01:31 +00:00
subject:
organizations:
- Cockroach
{{- else }}
organization:
- Cockroach
{{- end }}
2022-10-26 08:01:31 +00:00
secretName: {{ .Values.tls.certs.clientRootSecret }}
issuerRef:
name: {{ .Values.tls.certs.certManagerIssuer.name }}
kind: {{ .Values.tls.certs.certManagerIssuer.kind }}
group: {{ .Values.tls.certs.certManagerIssuer.group }}
2022-10-26 08:01:31 +00:00
{{- end }}