From 35f8c5876d91b43adfe88a64f3e39516ae92c644 Mon Sep 17 00:00:00 2001 From: Ryan Richard Date: Fri, 19 Dec 2025 13:15:36 -0800 Subject: [PATCH] skip client-side validation of manifest when k8s server < 1.27 After upgrading libs to k8s 1.35, this stopped working on very old versions of Kube. Not really a problem, because version 1.26 and below are all over 3 years old. You can still install Pinniped on these old version if you skip kubectl's client-side validation. --- .../shared-helpers/prepare-cluster-for-integration-tests.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pipelines/shared-helpers/prepare-cluster-for-integration-tests.sh b/pipelines/shared-helpers/prepare-cluster-for-integration-tests.sh index 221e05f25..0e8763717 100755 --- a/pipelines/shared-helpers/prepare-cluster-for-integration-tests.sh +++ b/pipelines/shared-helpers/prepare-cluster-for-integration-tests.sh @@ -854,7 +854,7 @@ echo set -x kapp deploy --yes --app "$concierge_app_name" --diff-changes --file "$manifest" -if ! { (($(kubectl version --output json | jq -r .serverVersion.major) == 1)) && (($(kubectl version --output json | jq -r .serverVersion.minor) < 19)); }; then +if ! { (($(kubectl version --output json | jq -r .serverVersion.major) == 1)) && (($(kubectl version --output json | jq -r .serverVersion.minor) < 27)); }; then # Also perform a dry-run create with kubectl just to see if there are any validation errors. # Skip this on very old clusters, since we use some API fields (like seccompProfile) which did not exist back then. # Use can still install on these clusters by using kapp or by using kubectl --validate=false. @@ -939,7 +939,7 @@ echo set -x kapp deploy --yes --app "$supervisor_app_name" --diff-changes --file "$manifest" -if ! { (($(kubectl version --output json | jq -r .serverVersion.major) == 1)) && (($(kubectl version --output json | jq -r .serverVersion.minor) < 23)); }; then +if ! { (($(kubectl version --output json | jq -r .serverVersion.major) == 1)) && (($(kubectl version --output json | jq -r .serverVersion.minor) < 27)); }; then # Also perform a dry-run create with kubectl just to see if there are any validation errors. # Skip this on very old clusters, since we use some API fields (like seccompProfile) which did not exist back then. # In the Supervisor CRDs we began to use CEL validations which were introduced in Kubernetes 1.23.