Skip to content

Commit

Permalink
Webhook request and response
Browse files Browse the repository at this point in the history
Webhooks are sent as POST requests, with Content-Type: application/json,
with an AdmissionReview API object in the admission.k8s.io API group
serialized to JSON as the body.

Webhooks can specify what versions of AdmissionReview objects they
accept with the admissionReviewVersions field in their configuration:

apiVersion: admissionregistration.k8s.io/v1
kind: ValidatingWebhookConfiguration
webhooks:
- name: foo.gocardless.com
  admissionReviewVersions: ["v1", "v1beta1"]
  • Loading branch information
rnaveiras committed Jun 12, 2023
1 parent f8e4cf1 commit 270ef35
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion config/base/webhooks/vault.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ metadata:
annotations:
cert-manager.io/inject-ca-from: theatre-system/theatre-vault-manager
webhooks:
- admissionReviewVersions: ["v1"]
- admissionReviewVersions: ["v1", "v1beta1"]
clientConfig:
caBundle: Cg==
service:
Expand Down
10 changes: 5 additions & 5 deletions config/base/webhooks/workloads.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ metadata:
annotations:
cert-manager.io/inject-ca-from: theatre-system/theatre-workloads-manager
webhooks:
- admissionReviewVersions: ["v1"]
- admissionReviewVersions: ["v1", "v1beta1"]
clientConfig:
caBundle: Cg==
service:
Expand All @@ -30,7 +30,7 @@ webhooks:
- consoles
scope: '*'
sideEffects: None
- admissionReviewVersions: ["v1"]
- admissionReviewVersions: ["v1", "v1beta1"]
clientConfig:
caBundle: Cg==
service:
Expand Down Expand Up @@ -68,7 +68,7 @@ metadata:
annotations:
cert-manager.io/inject-ca-from: theatre-system/theatre-workloads-manager
webhooks:
- admissionReviewVersions: ["v1"]
- admissionReviewVersions: ["v1", "v1beta1"]
clientConfig:
caBundle: Cg==
service:
Expand All @@ -92,7 +92,7 @@ webhooks:
- consoleauthorisations
scope: '*'
sideEffects: None
- admissionReviewVersions: ["v1"]
- admissionReviewVersions: ["v1", "v1beta1"]
clientConfig:
caBundle: Cg==
service:
Expand All @@ -117,7 +117,7 @@ webhooks:
- consoletemplates
scope: '*'
sideEffects: None
- admissionReviewVersions: ["v1"]
- admissionReviewVersions: ["v1", "v1beta1"]
clientConfig:
caBundle: Cg==
service:
Expand Down

0 comments on commit 270ef35

Please sign in to comment.