Skip to content

Commit c4164b7

Browse files
Travis Holtonprometherion
andcommitted
feat: Allow additional SANS for web certificate
This makes it possible to include extra variants of the service-name that aren't captured by the {{ include "capsule.fullname" }} macro Signed-off-by: Travis Holton <heytrav@proton.me> Update charts/capsule/README.md Co-authored-by: Dario Tranchitella <dario@tranchitella.eu>
1 parent 20807ad commit c4164b7

File tree

3 files changed

+6
-1
lines changed

3 files changed

+6
-1
lines changed

charts/capsule/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@ Here the values you can override:
9898
| Key | Type | Default | Description |
9999
|-----|------|---------|-------------|
100100
| affinity | object | `{}` | Set affinity rules for the Capsule pod |
101+
| certManager.additionalSANS | list | `[]` | Specify additional SANS to add to the certificate |
101102
| certManager.generateCertificates | bool | `false` | Specifies whether capsule webhooks certificates should be generated using cert-manager |
102103
| customAnnotations | object | `{}` | Additional annotations which will be added to all resources created by Capsule helm chart |
103104
| customLabels | object | `{}` | Additional labels which will be added to all resources created by Capsule helm chart |

charts/capsule/templates/certificate.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@ spec:
2727
dnsNames:
2828
- {{ include "capsule.fullname" . }}-webhook-service.{{ .Release.Namespace }}.svc
2929
- {{ include "capsule.fullname" . }}-webhook-service.{{ .Release.Namespace }}.svc.cluster.local
30+
{{- range .Values.certManager.additionalSANS }}
31+
- {{ toYaml . }}
32+
{{- end }}
3033
issuerRef:
3134
kind: Issuer
3235
name: {{ include "capsule.fullname" . }}-webhook-selfsigned

charts/capsule/values.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,8 @@ serviceAccount:
212212
certManager:
213213
# -- Specifies whether capsule webhooks certificates should be generated using cert-manager
214214
generateCertificates: false
215-
215+
# -- Specify additional SANS to add to the certificate
216+
additionalSANS: []
216217
# -- Additional labels which will be added to all resources created by Capsule helm chart
217218
customLabels: {}
218219

0 commit comments

Comments
 (0)