Webhook
Appears in
Section titled “Appears in”.Values.webhook
Naming scheme
Section titled “Naming scheme”$FullName-$WebhookName
(release-name-chart-name-webhook-name)
webhook
Section titled “webhook”Create webhook objects
Key | webhook |
Type | map |
Required | ❌ |
Helm tpl | ❌ |
Default | {} |
Example
webhook: {}
Define a webhook object with the given name
Key | webhook.$name |
Type | map |
Required | ✅ |
Helm tpl | ❌ |
Default | {} |
Example
webhook: webhook-name: {}
enabled
Section titled “enabled”Enables or Disables the webhook
Key | webhook.$name.enabled |
Type | bool |
Required | ✅ |
Helm tpl | ✅ |
Default | false |
Example
webhook: webhook-name: enabled: true
namespace
Section titled “namespace”Define the namespace for this object
Key | webhook.$name.namespace |
Type | string |
Required | ❌ |
Helm tpl | ✅ (On value only) |
Default | "" |
Example
webhook: webhook-name: namespace: some-namespace
labels
Section titled “labels”Additional labels for webhook
Key | webhook.$name.labels |
Type | map |
Required | ❌ |
Helm tpl | ✅ (On value only) |
Default | {} |
Example
webhook: webhook-name: labels: key: value keytpl: "{{ .Values.some.value }}"
annotations
Section titled “annotations”Additional annotations for webhook
Key | webhook.$name.annotations |
Type | map |
Required | ❌ |
Helm tpl | ✅ (On value only) |
Default | {} |
Example
webhook: webhook-name: annotations: key: value keytpl: "{{ .Values.some.value }}"
Define the type of the webhook.
Key | webhook.$name.type |
Type | string |
Required | ✅ |
Helm tpl | ✅ |
Default | "" |
Valid Values:
mutating
validating
Example
webhook: webhook-name: type: mutating
webhooks
Section titled “webhooks”Define the webhooks.
Key | webhook.$name.webhooks |
Type | list of map |
Required | ✅ |
Helm tpl | ❌ |
Default | [] |
Example
webhook: webhook-name: webhooks: []
webhooks[].name
Section titled “webhooks[].name”Define the webhook name
Key | webhook.$name.webhooks[].name |
Type | string |
Required | ✅ |
Helm tpl | ✅ |
Default | "" |
Example
webhook: webhook-name: webhooks: - name: webhook-name
webhooks[].failurePolicy
Section titled “webhooks[].failurePolicy”Define the failurePolicy for the webhook
Key | webhook.$name.webhooks[].failurePolicy |
Type | string |
Required | ❌ |
Helm tpl | ✅ |
Default | "" |
Valid Values:
Ignore
Fail
Example
webhook: webhook-name: webhooks: - ailurePolicy: Fail
webhooks[].matchPolicy
Section titled “webhooks[].matchPolicy”Define the matchPolicy for the webhook
Key | webhook.$name.webhooks[].matchPolicy |
Type | string |
Required | ❌ |
Helm tpl | ✅ |
Default | "" |
Valid Values:
Exact
Equivalent
Example
webhook: webhook-name: webhooks: - matchPolicy: Exact
webhooks[].sideEffects
Section titled “webhooks[].sideEffects”Define the sideEffects for the webhook
Key | webhook.$name.webhooks[].sideEffects |
Type | string |
Required | ❌ |
Helm tpl | ✅ |
Default | "" |
Valid Values:
None
NoneOnDryRun
Example
webhook: webhook-name: webhooks: - sideEffects: None
webhooks[].reinvocationPolicy
Section titled “webhooks[].reinvocationPolicy”Define the reinvocationPolicy for the webhook
Key | webhook.$name.webhooks[].reinvocationPolicy |
Type | string |
Required | ❌ |
Helm tpl | ✅ |
Default | "" |
Valid Values:
Never
IfNeeded
Example
webhook: webhook-name: webhooks: - reinvocationPolicy: Never
webhooks[].timeoutSeconds
Section titled “webhooks[].timeoutSeconds”Define the timeoutSeconds for the webhook
Key | webhook.$name.webhooks[].timeoutSeconds |
Type | int |
Required | ❌ |
Helm tpl | ✅ |
Default | "" |
Example
webhook: webhook-name: webhooks: - timeoutSeconds: 30
webhooks[].admissionReviewVersions
Section titled “webhooks[].admissionReviewVersions”Define the admissionReviewVersions for the webhook
Key | webhook.$name.webhooks[].admissionReviewVersions |
Type | list of string |
Required | ✅ |
Helm tpl | ✅ |
Default | [] |
Example
webhook: webhook-name: webhooks: - admissionReviewVersions: - v1 - v1beta1
webhooks[].clientConfig
Section titled “webhooks[].clientConfig”Define the clientConfig for the webhook
Key | webhook.$name.webhooks[].clientConfig |
Type | map |
Required | ✅ |
Helm tpl | ❌ |
Default | {} |
webhooks[].clientConfig.caBundle
Section titled “webhooks[].clientConfig.caBundle”Define the caBundle in clientConfig for the webhook
Key | webhook.$name.webhooks[].clientConfig.caBundle |
Type | string |
Required | ❌ |
Helm tpl | ✅ |
Default | "" |
Example
webhook: webhook-name: webhooks: - clientConfig: caBundle: ""
webhooks[].clientConfig.url
Section titled “webhooks[].clientConfig.url”Define the url in clientConfig for the webhook, required if service is not defined in clientConfig
Key | webhook.$name.webhooks[].clientConfig.url |
Type | string |
Required | ❌ |
Helm tpl | ✅ |
Default | "" |
Example
webhook: webhook-name: webhooks: - clientConfig: url: ""
webhooks[].clientConfig.service
Section titled “webhooks[].clientConfig.service”Define the service in clientConfig for the webhook, required if url is not defined in clientConfig
Key | webhook.$name.webhooks[].clientConfig.service |
Type | map |
Required | ❌ |
Helm tpl | ❌ |
Default | {} |
Example
webhook: webhook-name: webhooks: - clientConfig: service: {}
webhooks[].clientConfig.service.name
Section titled “webhooks[].clientConfig.service.name”Define the service name in clientConfig for the webhook
Key | webhook.$name.webhooks[].clientConfig.service.name |
Type | string |
Required | ✅ |
Helm tpl | ✅ |
Default | "" |
Example
webhook: webhook-name: webhooks: - clientConfig: service: name: ""
webhooks[].clientConfig.service.namespace
Section titled “webhooks[].clientConfig.service.namespace”Define the service namespace in clientConfig for the webhook
Key | webhook.$name.webhooks[].clientConfig.service.namespace |
Type | string |
Required | ✅ |
Helm tpl | ✅ |
Default | "" |
Example
webhook: webhook-name: webhooks: - clientConfig: service: namespace: ""
webhooks[].clientConfig.service.path
Section titled “webhooks[].clientConfig.service.path”Define the service path in clientConfig for the webhook
Key | webhook.$name.webhooks[].clientConfig.service.path |
Type | string |
Required | ❌ |
Helm tpl | ✅ |
Default | "" |
Example
webhook: webhook-name: webhooks: - clientConfig: service: path: ""
webhooks[].clientConfig.service.port
Section titled “webhooks[].clientConfig.service.port”Define the service port in clientConfig for the webhook
Key | webhook.$name.webhooks[].clientConfig.service.port |
Type | int |
Required | ❌ |
Helm tpl | ✅ |
Default | unset |
Example
webhook: webhook-name: webhooks: - clientConfig: service: port: 443
webhooks[].rules
Section titled “webhooks[].rules”Define the rules for the webhook
Key | webhook.$name.webhooks[].rules |
Type | list of map |
Required | ✅ |
Helm tpl | ❌ |
Default | [] |
Example
webhook: webhook-name: webhooks: - rules: []
webhooks[].rules[].scope
Section titled “webhooks[].rules[].scope”Define the scope of the rule for the webhook
Key | webhook.$name.webhooks[].rules[].scope |
Type | string |
Required | ❌ |
Helm tpl | ✅ |
Default | "" |
Valid Values:
Cluster
Namespaced
*
Example
webhook: webhook-name: webhooks: - rules: - scope: Cluster
webhooks[].rules[].apiGroups
Section titled “webhooks[].rules[].apiGroups”Define the apiGroups of the rule for the webhook
Key | webhook.$name.webhooks[].rules[].apiGroups |
Type | list of string |
Required | ✅ |
Helm tpl | ✅ (On entries only) |
Default | [] |
Example
webhook: webhook-name: webhooks: - rules: - apiGroups: - "" - "apps"
webhooks[].rules[].apiVersions
Section titled “webhooks[].rules[].apiVersions”Define the apiVersions of the rule for the webhook
Key | webhook.$name.webhooks[].rules[].apiVersions |
Type | list of string |
Required | ✅ |
Helm tpl | ✅ (On entries only) |
Default | [] |
Example
webhook: webhook-name: webhooks: - rules: - apiGroups: - v1 - v1beta1
webhooks[].rules[].operations
Section titled “webhooks[].rules[].operations”Define the operations of the rule for the webhook
Key | webhook.$name.webhooks[].rules[].operations |
Type | list of string |
Required | ✅ |
Helm tpl | ✅ (On entries only) |
Default | [] |
Example
webhook: webhook-name: webhooks: - rules: - operations: - CREATE - UPDATE
webhooks[].rules[].resources
Section titled “webhooks[].rules[].resources”Define the resources of the rule for the webhook
Key | webhook.$name.webhooks[].rules[].resources |
Type | list of string |
Required | ✅ |
Helm tpl | ✅ (On entries only) |
Default | [] |
Example
webhook: webhook-name: webhooks: - rules: - resources: - pods - pods/status
Full Examples
Section titled “Full Examples”webhook: webhook-name: enabled: true labels: key: value keytpl: "{{ .Values.some.value }}" annotations: key: value keytpl: "{{ .Values.some.value }}" type: mutating webhooks: - name: webhook-name failurePolicy: Fail matchPolicy: Exact sideEffects: None reinvocationPolicy: Never timeoutSeconds: 30 admissionReviewVersions: - v1 - v1beta1 clientConfig: caBundle: "" url: "" rules: - scope: Cluster apiGroups: - "" apiVersions: - v1 operations: - CREATE - UPDATE resources: - pods - pods/status
other-webhook-name: enabled: true namespace: some-namespace type: validating webhooks: - name: other-webhook-name failurePolicy: Fail matchPolicy: Exact sideEffects: None timeoutSeconds: 30 admissionReviewVersions: - v1 - v1beta1 clientConfig: caBundle: "" service: name: "" namespace: "" path: "" port: 443 rules: - scope: Namespaced apiGroups: - "" apiVersions: - v1 operations: - CREATE - UPDATE resources: - pods - pods/status