feat: add support for external/existing certificate issuer (#2631)

This commit is contained in:
majinghe
2026-04-21 15:21:43 +08:00
committed by GitHub
parent 960c13a34b
commit 41d2812861
7 changed files with 34 additions and 6 deletions
@@ -1,4 +1,4 @@
{{- if .Values.mtls.enabled }}
{{- if and .Values.mtls.enabled (not .Values.mtls.existingIssuerRef.enabled) }}
apiVersion: cert-manager.io/v1
kind: ClusterIssuer
metadata:
@@ -6,3 +6,4 @@ metadata:
spec:
selfSigned: {}
{{- end }}
@@ -1,4 +1,4 @@
{{- if .Values.mtls.enabled }}
{{- if and .Values.mtls.enabled (not .Values.mtls.existingIssuerRef.enabled) }}
apiVersion: cert-manager.io/v1
kind: Certificate
metadata:
@@ -11,4 +11,5 @@ spec:
issuerRef:
name: {{ include "rustfs.fullname" . }}-selfsigned-issuer
kind: ClusterIssuer
{{- end }}
{{- end }}
@@ -1,4 +1,4 @@
{{- if .Values.mtls.enabled }}
{{- if and .Values.mtls.enabled (not .Values.mtls.existingIssuerRef.enabled) }}
apiVersion: cert-manager.io/v1
kind: Issuer
metadata:
@@ -7,4 +7,5 @@ metadata:
spec:
ca:
secretName: {{ include "rustfs.fullname" . }}-root-ca-secret
{{- end }}
{{- end }}
@@ -6,9 +6,16 @@ metadata:
namespace: {{ .Release.Namespace }}
spec:
secretName: {{ include "rustfs.fullname" . }}-server-tls
{{- if .Values.mtls.existingIssuerRef.enabled }}
issuerRef:
name: {{ .Values.mtls.existingIssuerRef.name }}
kind: {{ .Values.mtls.existingIssuerRef.kind }}
group: {{ .Values.mtls.existingIssuerRef.group }}
{{- else }}
issuerRef:
name: {{ include "rustfs.fullname" . }}-ca-issuer
kind: Issuer
{{- end }}
commonName: {{ include "rustfs.fullname" . }}-cluster
dnsNames:
- "*.{{ include "rustfs.fullname" . }}-headless"
@@ -20,4 +27,4 @@ spec:
{{- end }}
usages:
- server auth
{{- end }}
{{- end }}
@@ -6,10 +6,18 @@ metadata:
namespace: {{ .Release.Namespace }}
spec:
secretName: {{ include "rustfs.fullname" . }}-client-tls
{{- if .Values.mtls.existingIssuerRef.enabled }}
issuerRef:
name: {{ .Values.mtls.existingIssuerRef.name }}
kind: {{ .Values.mtls.existingIssuerRef.kind }}
group: {{ .Values.mtls.existingIssuerRef.group }}
{{- else }}
issuerRef:
name: {{ include "rustfs.fullname" . }}-ca-issuer
kind: Issuer
{{- end }}
commonName: {{ include "rustfs.fullname" . }}-cluster
usages:
- client auth
{{- end }}