Skip to content

Webhook


Appears in

  • .Values.webhook

Naming scheme

  • $FullName-$WebhookName (release-name-chart-name-webhook-name)

webhook

Create webhook objects

Keywebhook
Typemap
Required
Helm tpl
Default{}

Example

webhook: {}

$name

Define a webhook object with the given name

Keywebhook.$name
Typemap
Required
Helm tpl
Default{}

Example

webhook:
webhook-name: {}

enabled

Enables or Disables the webhook

Keywebhook.$name.enabled
Typebool
Required
Helm tpl
Defaultfalse

Example

webhook:
webhook-name:
enabled: true

namespace

Define the namespace for this object

Keywebhook.$name.namespace
Typestring
Required
Helm tpl✅ (On value only)
Default""

Example

webhook:
webhook-name:
namespace: some-namespace

labels

Additional labels for webhook

Keywebhook.$name.labels
Typemap
Required
Helm tpl✅ (On value only)
Default{}

Example

webhook:
webhook-name:
labels:
key: value
keytpl: "{{ .Values.some.value }}"

annotations

Additional annotations for webhook

Keywebhook.$name.annotations
Typemap
Required
Helm tpl✅ (On value only)
Default{}

Example

webhook:
webhook-name:
annotations:
key: value
keytpl: "{{ .Values.some.value }}"

type

Define the type of the webhook.

Keywebhook.$name.type
Typestring
Required
Helm tpl
Default""

Valid Values:

  • mutating
  • validating

Example

webhook:
webhook-name:
type: mutating

webhooks

Define the webhooks.

Keywebhook.$name.webhooks
Typelist of map
Required
Helm tpl
Default[]

Example

webhook:
webhook-name:
webhooks: []

webhooks[].name

Define the webhook name

Keywebhook.$name.webhooks[].name
Typestring
Required
Helm tpl
Default""

Example

webhook:
webhook-name:
webhooks:
- name: webhook-name

webhooks[].failurePolicy

Define the failurePolicy for the webhook

Keywebhook.$name.webhooks[].failurePolicy
Typestring
Required
Helm tpl
Default""

Valid Values:

  • Ignore
  • Fail

Example

webhook:
webhook-name:
webhooks:
- ailurePolicy: Fail

webhooks[].matchPolicy

Define the matchPolicy for the webhook

Keywebhook.$name.webhooks[].matchPolicy
Typestring
Required
Helm tpl
Default""

Valid Values:

  • Exact
  • Equivalent

Example

webhook:
webhook-name:
webhooks:
- matchPolicy: Exact

webhooks[].sideEffects

Define the sideEffects for the webhook

Keywebhook.$name.webhooks[].sideEffects
Typestring
Required
Helm tpl
Default""

Valid Values:

  • None
  • NoneOnDryRun

Example

webhook:
webhook-name:
webhooks:
- sideEffects: None

webhooks[].reinvocationPolicy

Define the reinvocationPolicy for the webhook

Keywebhook.$name.webhooks[].reinvocationPolicy
Typestring
Required
Helm tpl
Default""

Valid Values:

  • Never
  • IfNeeded

Example

webhook:
webhook-name:
webhooks:
- reinvocationPolicy: Never

webhooks[].timeoutSeconds

Define the timeoutSeconds for the webhook

Keywebhook.$name.webhooks[].timeoutSeconds
Typeint
Required
Helm tpl
Default""

Example

webhook:
webhook-name:
webhooks:
- timeoutSeconds: 30

webhooks[].admissionReviewVersions

Define the admissionReviewVersions for the webhook

Keywebhook.$name.webhooks[].admissionReviewVersions
Typelist of string
Required
Helm tpl
Default[]

Example

webhook:
webhook-name:
webhooks:
- admissionReviewVersions:
- v1
- v1beta1

webhooks[].clientConfig

Define the clientConfig for the webhook

Keywebhook.$name.webhooks[].clientConfig
Typemap
Required
Helm tpl
Default{}

webhooks[].clientConfig.caBundle

Define the caBundle in clientConfig for the webhook

Keywebhook.$name.webhooks[].clientConfig.caBundle
Typestring
Required
Helm tpl
Default""

Example

webhook:
webhook-name:
webhooks:
- clientConfig:
caBundle: ""
webhooks[].clientConfig.url

Define the url in clientConfig for the webhook, required if service is not defined in clientConfig

Keywebhook.$name.webhooks[].clientConfig.url
Typestring
Required
Helm tpl
Default""

Example

webhook:
webhook-name:
webhooks:
- clientConfig:
url: ""

webhooks[].clientConfig.service

Define the service in clientConfig for the webhook, required if url is not defined in clientConfig

Keywebhook.$name.webhooks[].clientConfig.service
Typemap
Required
Helm tpl
Default{}

Example

webhook:
webhook-name:
webhooks:
- clientConfig:
service: {}

webhooks[].clientConfig.service.name

Define the service name in clientConfig for the webhook

Keywebhook.$name.webhooks[].clientConfig.service.name
Typestring
Required
Helm tpl
Default""

Example

webhook:
webhook-name:
webhooks:
- clientConfig:
service:
name: ""

webhooks[].clientConfig.service.namespace

Define the service namespace in clientConfig for the webhook

Keywebhook.$name.webhooks[].clientConfig.service.namespace
Typestring
Required
Helm tpl
Default""

Example

webhook:
webhook-name:
webhooks:
- clientConfig:
service:
namespace: ""

webhooks[].clientConfig.service.path

Define the service path in clientConfig for the webhook

Keywebhook.$name.webhooks[].clientConfig.service.path
Typestring
Required
Helm tpl
Default""

Example

webhook:
webhook-name:
webhooks:
- clientConfig:
service:
path: ""

webhooks[].clientConfig.service.port

Define the service port in clientConfig for the webhook

Keywebhook.$name.webhooks[].clientConfig.service.port
Typeint
Required
Helm tpl
Defaultunset

Example

webhook:
webhook-name:
webhooks:
- clientConfig:
service:
port: 443

webhooks[].rules

Define the rules for the webhook

Keywebhook.$name.webhooks[].rules
Typelist of map
Required
Helm tpl
Default[]

Example

webhook:
webhook-name:
webhooks:
- rules: []

webhooks[].rules[].scope

Define the scope of the rule for the webhook

Keywebhook.$name.webhooks[].rules[].scope
Typestring
Required
Helm tpl
Default""

Valid Values:

  • Cluster
  • Namespaced
  • *

Example

webhook:
webhook-name:
webhooks:
- rules:
- scope: Cluster

webhooks[].rules[].apiGroups

Define the apiGroups of the rule for the webhook

Keywebhook.$name.webhooks[].rules[].apiGroups
Typelist of string
Required
Helm tpl✅ (On entries only)
Default[]

Example

webhook:
webhook-name:
webhooks:
- rules:
- apiGroups:
- ""
- "apps"

webhooks[].rules[].apiVersions

Define the apiVersions of the rule for the webhook

Keywebhook.$name.webhooks[].rules[].apiVersions
Typelist of string
Required
Helm tpl✅ (On entries only)
Default[]

Example

webhook:
webhook-name:
webhooks:
- rules:
- apiGroups:
- v1
- v1beta1

webhooks[].rules[].operations

Define the operations of the rule for the webhook

Keywebhook.$name.webhooks[].rules[].operations
Typelist of string
Required
Helm tpl✅ (On entries only)
Default[]

Example

webhook:
webhook-name:
webhooks:
- rules:
- operations:
- CREATE
- UPDATE

webhooks[].rules[].resources

Define the resources of the rule for the webhook

Keywebhook.$name.webhooks[].rules[].resources
Typelist of string
Required
Helm tpl✅ (On entries only)
Default[]

Example

webhook:
webhook-name:
webhooks:
- rules:
- resources:
- pods
- pods/status

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