Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion charts/rollout-operator/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,5 +85,5 @@ Manually applying these CRDs is only required if upgrading from a chart <= v0.32
| tolerations | list | `[]` | |
| webhooks.enabled | bool | `true` | Enable the rollout-operator webhooks. See https://github.com/grafana/rollout-operator/#webhooks. Note that the webhooks require custom resource definitions. If upgrading, manually apply the files in the `crds` directory. |
| webhooks.failurePolicy | string | `"Fail"` | Validating and mutating webhook failure policy. `Ignore` or `Fail`. |
| webhooks.selfSignedCertSecretName | string | `""` | Secret resource name for the TLS certificate to be used with the webhooks. If not set, a secret's name will be generated using the fullname template. |
| webhooks.objectSelector | object | `{}` | objectSelector to filter which objects the webhooks apply to. |
| webhooks.selfSignedCertSecretName | string | `"certificate"` | Secret resource name for the TLS certificate to be used with the webhooks |
8 changes: 8 additions & 0 deletions charts/rollout-operator/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -92,3 +92,11 @@ Create the image name
{{- (printf "%s:%s" .Values.image.repository $imageTag) }}
{{- end -}}
{{- end -}}

{{- define "rollout-operator.secretName" -}}
{{- if .Values.webhook.selfSignedCertSecretName }}
{{- .Values.webhook.selfSignedCertSecretName }}
{{- else }}
{{- include "rollout-operator.fullname" . }}
{{- end }}
{{- end }}
2 changes: 1 addition & 1 deletion charts/rollout-operator/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ spec:
- -kubernetes.namespace={{ .Release.Namespace }}
{{- if .Values.webhooks.enabled }}
- -server-tls.enabled=true
- -server-tls.self-signed-cert.secret-name={{ .Values.webhooks.selfSignedCertSecretName }}
- -server-tls.self-signed-cert.secret-name={{ include "rollout-operator.secretName" . }}
- -server-tls.self-signed-cert.dns-name={{ include "rollout-operator.fullname" . }}.{{ .Release.Namespace }}.svc
{{- end }}
{{- range .Values.extraArgs }}
Expand Down
2 changes: 1 addition & 1 deletion charts/rollout-operator/templates/webhook-role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ rules:
- update
- get
resourceNames:
- {{ .Values.webhooks.selfSignedCertSecretName }}
- {{ include "rollout-operator.secretName" . }}
- apiGroups:
- ""
resources:
Expand Down
4 changes: 2 additions & 2 deletions charts/rollout-operator/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,8 @@ webhooks:
enabled: true
# -- Validating and mutating webhook failure policy. `Ignore` or `Fail`.
failurePolicy: "Fail"
# -- Secret resource name for the TLS certificate to be used with the webhooks
selfSignedCertSecretName: "certificate"
# -- Secret resource name for the TLS certificate to be used with the webhooks. If not set, a secret's name will be generated using the fullname template.
selfSignedCertSecretName: ""
# -- objectSelector to filter which objects the webhooks apply to.
objectSelector: {}
# See https://kubernetes.io/docs/reference/access-authn-authz/extensible-admission-controllers/#matching-requests-objectselector
Expand Down
Loading