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

Commit 8a2f4a4

Browse files
authored
Merge pull request #1318 from mesosphere/hectorj2f/specify_properties_certificate
chore: make certain cert-manager properties configurable
2 parents ac176c4 + 09fa192 commit 8a2f4a4

File tree

3 files changed

+17
-1
lines changed

3 files changed

+17
-1
lines changed

charts/kubefed/README.md

+4
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,10 @@ chart and their default values.
121121
| controllermanager.clusterHealthCheckTimeout | Duration after which the cluster health check times out. | 3s |
122122
| controllermanager.syncController.adoptResources | Whether to adopt pre-existing resource in member clusters. | Enabled |
123123
| controllermanager.service.labels | Kubernetes labels attached to the controller manager's services | {} |
124+
| controllermanager.certManager.enabled | Specifies whether to enable the usage of the cert-manager for the certificates generation. | false |
125+
| controllermanager.certManager.rootCertificate.organizations | Specifies the list of organizations to include in the cert-manager generated root certificate. | [] |
126+
| controllermanager.certManager.rootCertificate.commonName | Specifies the CN value for the cert-manager generated root certificate. | ca.webhook.kubefed |
127+
| controllermanager.certManager.rootCertificate.dnsNames | Specifies the list of subject alternative names for the cert-manager generated root certificate. | ["ca.webhook.kubefed"] |
124128
| global.scope | Whether the KubeFed namespace will be the only target for the control plane. | Cluster |
125129

126130
Specify each parameter using the `--set key=value[,key=value]` argument to

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

+8-1
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,14 @@ spec:
169169
duration: 8760h # 1y
170170
issuerRef:
171171
name: {{ .Release.Name }}-ca-issuer
172-
commonName: "ca.webhook.kubefed"
172+
commonName: {{ .Values.certManager.rootCertificate.commonName }}
173+
{{- if .Values.certManager.rootCertificate.organizations }}
174+
subject:
175+
organizations:
176+
{{- toYaml .Values.certManager.rootCertificate.organizations | nindent 4 }}
177+
{{- end }}
178+
dnsNames:
179+
{{- toYaml .Values.certManager.rootCertificate.dnsNames | nindent 4 }}
173180
isCA: true
174181
---
175182
# Create an Issuer that uses the above generated CA certificate to issue certs

charts/kubefed/values.yaml

+5
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,11 @@ controllermanager:
7474

7575
certManager:
7676
enabled: false
77+
rootCertificate:
78+
organizations: []
79+
dnsNames:
80+
- ca.webhook.kubefed
81+
commonName: ca.webhook.kubefed
7782

7883
service:
7984
labels: {}

0 commit comments

Comments
 (0)