Skip to content

Commit

Permalink
Merge pull request #469 from guntiskarulis/helm-secretTemplate
Browse files Browse the repository at this point in the history
feat(helm): add secretTemplate-ing to certificate
  • Loading branch information
cert-manager-prow[bot] authored Nov 5, 2024
2 parents 249f3a3 + fe1c21e commit 156e169
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 0 deletions.
5 changes: 5 additions & 0 deletions deploy/charts/trust-manager/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -442,6 +442,11 @@ The namespace in which cert-manager was installed. Only used if `app.webhook.tls
> ```
The name of cert-manager's Service Account. Only used if `app.webhook.tls.approverPolicy.enabled` is true.
#### **app.webhook.tls.certificate.secretTemplate** ~ `object`
> Default value:
> ```yaml
> {}
> ```
#### **app.webhook.hostNetwork** ~ `bool`
> Default value:
> ```yaml
Expand Down
4 changes: 4 additions & 0 deletions deploy/charts/trust-manager/templates/certificate.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ spec:
dnsNames:
- "{{ include "trust-manager.name" . }}.{{ include "trust-manager.namespace" . }}.svc"
secretName: {{ include "trust-manager.name" . }}-tls
{{- with .Values.app.webhook.tls.certificate.secretTemplate }}
secretTemplate:
{{- toYaml .| nindent 4 }}
{{- end }}
revisionHistoryLimit: 1
issuerRef:
name: {{ include "trust-manager.name" . }}
Expand Down
16 changes: 16 additions & 0 deletions deploy/charts/trust-manager/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -392,6 +392,9 @@
"approverPolicy": {
"$ref": "#/$defs/helm-values.app.webhook.tls.approverPolicy"
},
"certificate": {
"$ref": "#/$defs/helm-values.app.webhook.tls.certificate"
},
"helmCert": {
"$ref": "#/$defs/helm-values.app.webhook.tls.helmCert"
}
Expand Down Expand Up @@ -428,6 +431,19 @@
"description": "Whether to create an approver-policy CertificateRequestPolicy allowing auto-approval of the trust-manager webhook certificate. If you have approver-policy installed, you almost certainly want to enable this.",
"type": "boolean"
},
"helm-values.app.webhook.tls.certificate": {
"additionalProperties": false,
"properties": {
"secretTemplate": {
"$ref": "#/$defs/helm-values.app.webhook.tls.certificate.secretTemplate"
}
},
"type": "object"
},
"helm-values.app.webhook.tls.certificate.secretTemplate": {
"default": {},
"type": "object"
},
"helm-values.app.webhook.tls.helmCert": {
"additionalProperties": false,
"properties": {
Expand Down
11 changes: 11 additions & 0 deletions deploy/charts/trust-manager/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,17 @@ app:

# The name of cert-manager's Service Account. Only used if `app.webhook.tls.approverPolicy.enabled` is true.
certManagerServiceAccount: "cert-manager"

# Add labels/annotations to secrets created by Certificate resources when using cert-manager provisioned TLS certificate.
certificate:
secretTemplate: {}
# For example:
# annotations:
# my-secret-annotation-1: "foo"
# my-secret-annotation-2: "bar"
# labels:
# my-secret-label: foo

# This value specifies if the app should be started in hostNetwork mode. It is required for use in some managed Kubernetes clusters (such as AWS EKS) with custom CNI.
hostNetwork: false

Expand Down

0 comments on commit 156e169

Please sign in to comment.