From 760f8b97b71b34bfbf2d242a7c34205b6244a857 Mon Sep 17 00:00:00 2001 From: Michael Lin Date: Wed, 18 Nov 2026 21:44:31 +0000 Subject: [PATCH] ci: validate manifests offline instead of against the old dotcom cluster verify-yaml.sh did a server-side dry run against the cloud GKE cluster in sourcegraph-dev, which is being removed. Validate the rendered base manifests with kubeconform against the Kubernetes 1.33 schemas instead. Amp-Thread-ID: https://ampcode.com/threads/T-01a1efa3-6bd0-7476-bce2-10965139dce3 Co-authored-by: Amp --- .buildkite/verify-yaml.sh | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/.buildkite/verify-yaml.sh b/.buildkite/verify-yaml.sh index 45f8c4d4..ca583a6e 100755 --- a/.buildkite/verify-yaml.sh +++ b/.buildkite/verify-yaml.sh @@ -1,10 +1,20 @@ #!/bin/bash -set -ex +set -exo pipefail cd "$(dirname "${BASH_SOURCE[0]}")/.." -gcloud container clusters get-credentials cloud --zone us-central1-f --project sourcegraph-dev +# Validate the rendered manifests against the Kubernetes schemas offline. This +# used to be a server-side dry run against the old dotcom cluster, which is +# being removed. +KUBECONFORM_VERSION=0.6.7 +KUBERNETES_VERSION=1.33.0 -kubectl kustomize ./base/. | kubectl apply --dry-run --validate --context=gke_sourcegraph-dev_us-central1-f_cloud -f - +bin="$(mktemp -d)" +trap 'rm -rf "$bin"' EXIT +curl -sSfL "https://github.com/yannh/kubeconform/releases/download/v${KUBECONFORM_VERSION}/kubeconform-linux-amd64.tar.gz" | + tar -xz -C "$bin" kubeconform + +kubectl kustomize ./base/. | + "$bin/kubeconform" -strict -summary -kubernetes-version "$KUBERNETES_VERSION" .buildkite/verify-label.sh