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:
@@ -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: |
|
||||
|
||||
Reference in New Issue
Block a user