ci(validate-kubernetes): pass --validate=false to kubectl dry-run

kubectl 1.34 (azure/setup-kubectl@v3) defaults to server-side validation, which tries to reach a kube-apiserver at localhost:8080. CI runners don't have one, so every kubectl apply --dry-run=client invocation in this job exits 1 with "dial tcp [::1]:8080: connect: connection refused".

This failure was masked on main because Prepare all required actions failed first on the broken ludovico85/kube-score-action@v1 pin; once that pin was fixed in the prior commit on this branch, kubectl became reachable and surfaced the next layer of failure. --validate=false disables the API-server roundtrip but keeps client-side YAML parsing, which is the only validation the runner can actually perform without a cluster.

Co-Authored-By: Nakamoto, S <[email protected]>
This commit is contained in:
Devin AI
2026-05-03 17:47:30 +00:00
co-authored by Nakamoto, S <[email protected]>
parent 7c3799a648
commit 9b36afb8d9
+7 -4
View File
@@ -54,10 +54,13 @@ jobs:
- name: Validate Kubernetes manifests
run: |
kubectl apply --dry-run=client -f k8s/base/namespace.yaml
kubectl apply --dry-run=client -f k8s/base/validators/statefulset.yaml
kubectl apply --dry-run=client -f k8s/base/sentries/statefulset.yaml
kubectl apply --dry-run=client -f k8s/base/rpc/statefulset.yaml
# --validate=false: kubectl 1.34's default server-side validation
# tries to hit a kube-apiserver at localhost:8080 which isn't
# available in CI. Client-side YAML parsing still runs.
kubectl apply --dry-run=client --validate=false -f k8s/base/namespace.yaml
kubectl apply --dry-run=client --validate=false -f k8s/base/validators/statefulset.yaml
kubectl apply --dry-run=client --validate=false -f k8s/base/sentries/statefulset.yaml
kubectl apply --dry-run=client --validate=false -f k8s/base/rpc/statefulset.yaml
- name: Install kube-score
run: |