From 16f5a1dba7c7afb73369d65221a4fb78400ca4ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Grzegorz=20Burzy=C5=84ski?= Date: Tue, 28 Nov 2023 19:09:29 +0100 Subject: [PATCH] fix: limit GWAPI webhook versions (#954) --- charts/kong/CHANGELOG.md | 3 +++ charts/kong/templates/admission-webhook.yaml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/charts/kong/CHANGELOG.md b/charts/kong/CHANGELOG.md index 6c5f4a14b..77cc1932f 100644 --- a/charts/kong/CHANGELOG.md +++ b/charts/kong/CHANGELOG.md @@ -8,6 +8,9 @@ [#957](https://github.com/Kong/charts/pull/957) * Support for `affinity` configuration has been added to migration job templates. * Display a warning message when Kong Manager is enabled and the Admin API is disabled. +* Validate Gateway API's `Gateway` and `HTTPRoute` resources in the controller's + admission webhook only when KIC version is 3.0 or higher. + [#954](https://github.com/Kong/charts/pull/954) ## 2.32.0 diff --git a/charts/kong/templates/admission-webhook.yaml b/charts/kong/templates/admission-webhook.yaml index 1be937fbb..979f1c0ab 100644 --- a/charts/kong/templates/admission-webhook.yaml +++ b/charts/kong/templates/admission-webhook.yaml @@ -104,7 +104,9 @@ webhooks: apiVersions: - 'v1alpha2' - 'v1beta1' +{{- if (semverCompare ">= 3.0.0" (include "kong.effectiveVersion" .Values.ingressController.image)) }} - 'v1' +{{- end }} operations: - CREATE - UPDATE