Skip to content

Commit

Permalink
feat: Allow additional SANS for web certificate
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
Travis Holton committed Dec 21, 2024
1 parent 20807ad commit 14a93b0
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions charts/capsule/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ Here the values you can override:
|-----|------|---------|-------------|
| affinity | object | `{}` | Set affinity rules for the Capsule pod |
| certManager.generateCertificates | bool | `false` | Specifies whether capsule webhooks certificates should be generated using cert-manager |
| certManager.generateCertificates | list | `[]` | Specify additional SANS to add to the certificate |
| customAnnotations | object | `{}` | Additional annotations which will be added to all resources created by Capsule helm chart |
| customLabels | object | `{}` | Additional labels which will be added to all resources created by Capsule helm chart |
| imagePullSecrets | list | `[]` | Configuration for `imagePullSecrets` so that you can use a private images registry. |
Expand Down
3 changes: 3 additions & 0 deletions charts/capsule/templates/certificate.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ spec:
dnsNames:
- {{ include "capsule.fullname" . }}-webhook-service.{{ .Release.Namespace }}.svc
- {{ include "capsule.fullname" . }}-webhook-service.{{ .Release.Namespace }}.svc.cluster.local
{{- range .Values.certManager.additionalSANS }}
- {{ toYaml . }}
{{- end }}
issuerRef:
kind: Issuer
name: {{ include "capsule.fullname" . }}-webhook-selfsigned
Expand Down
3 changes: 2 additions & 1 deletion charts/capsule/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,8 @@ serviceAccount:
certManager:
# -- Specifies whether capsule webhooks certificates should be generated using cert-manager
generateCertificates: false

# -- Specify additional SANS to add to the certificate
additionalSANS: []
# -- Additional labels which will be added to all resources created by Capsule helm chart
customLabels: {}

Expand Down

0 comments on commit 14a93b0

Please sign in to comment.