Skip to content
This repository was archived by the owner on Apr 25, 2023. It is now read-only.

Commit 671e57e

Browse files
authored
Merge pull request #1288 from alejandroEsc/ae/cert/versions
chart: cert-manager resources, allow these apiVersions be configurable
2 parents 585f1e0 + 33e395a commit 671e57e

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

charts/kubefed/charts/controllermanager/templates/webhook.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ metadata:
1515
{{- end }}
1616
annotations:
1717
{{- if .Values.certManager.enabled }}
18-
certmanager.k8s.io/inject-ca-from: {{ printf "%s/%s%s" .Release.Namespace .Release.Name "-root-certificate" | quote }}
18+
{{ .Values.certManager.apiGroup }}/inject-ca-from: {{ printf "%s/%s%s" .Release.Namespace .Release.Name "-root-certificate" | quote }}
1919
{{- end }}
2020
webhooks:
2121
- name: federatedtypeconfigs.core.kubefed.io
@@ -152,15 +152,15 @@ stringData:
152152
tls.key: {{ $cert.Key | quote }}
153153
{{- else }}
154154
---
155-
apiVersion: certmanager.k8s.io/v1alpha1
155+
apiVersion: {{ .Values.certManager.apiGroup }}/{{ .Values.certManager.apiVersion }}
156156
kind: Issuer
157157
metadata:
158158
name: {{ .Release.Name }}-ca-issuer
159159
spec:
160160
selfSigned: {}
161161
---
162162
# Generate a CA Certificate used to sign certificates for the webhook
163-
apiVersion: certmanager.k8s.io/v1alpha1
163+
apiVersion: {{ .Values.certManager.apiGroup }}/{{ .Values.certManager.apiVersion }}
164164
kind: Certificate
165165
metadata:
166166
name: {{ .Release.Name}}-root-certificate
@@ -173,7 +173,7 @@ spec:
173173
isCA: true
174174
---
175175
# Create an Issuer that uses the above generated CA certificate to issue certs
176-
apiVersion: certmanager.k8s.io/v1alpha1
176+
apiVersion: {{ .Values.certManager.apiGroup }}/{{ .Values.certManager.apiVersion }}
177177
kind: Issuer
178178
metadata:
179179
name: {{ .Release.Name }}-issuer
@@ -182,7 +182,7 @@ spec:
182182
secretName: {{ .Release.Name}}-root-ca
183183
---
184184
# Finally, generate a serving certificate for the webhook to use
185-
apiVersion: certmanager.k8s.io/v1alpha1
185+
apiVersion: {{ .Values.certManager.apiGroup }}/{{ .Values.certManager.apiVersion }}
186186
kind: Certificate
187187
metadata:
188188
name: {{ .Release.Name }}-certificate

charts/kubefed/values.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,8 @@ controllermanager:
6262

6363
certManager:
6464
enabled: false
65+
apiGroup: certmanager.k8s.io
66+
apiVersion: v1alpha1
6567

6668

6769
## Configuration global values for all charts

0 commit comments

Comments
 (0)