Skip to content

Commit

Permalink
Fixes flake in kubectl wait in CI
Browse files Browse the repository at this point in the history
This fixes a flake where `kubectl wait` would wait for CoreDNS
to be ready but as Cilium removed the pods it crashed causing the
wait command to fail.

This change will only watch Cilium pods to become ready after
which it will do a rollout check on CoreDNS' deployment to be ready

Signed-off-by: Maartje Eyskens <maartje.eyskens@isovalent.com>
  • Loading branch information
meyskens authored and nbusseneau committed Feb 15, 2023
1 parent 36a31b1 commit a2b5605
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 6 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/conformance-gateway-api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,8 @@ jobs:
--set securityContext.privileged=true \
--set gatewayAPI.enabled=true
kubectl wait -n kube-system --for=condition=Ready --all pod --timeout=${{ env.timeout }}
kubectl wait -n kube-system --for=condition=Ready -l app.kubernetes.io/part-of=cilium pod --timeout=${{ env.timeout }}
kubectl rollout -n kube-system status deploy/coredns --timeout=${{ env.timeout }}
# To make sure that cilium envoy CRs are available
kubectl wait --for condition=Established crd/ciliumenvoyconfigs.cilium.io --timeout=${{ env.timeout }}
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/conformance-ingress-shared.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,8 @@ jobs:
--set ingressController.loadbalancerMode=shared \
--set extraConfig.bpf-lb-acceleration=native # This is to make sure we have the coverage for XDP.
kubectl wait -n kube-system --for=condition=Ready --all pod --timeout=${{ env.timeout }}
kubectl wait -n kube-system --for=condition=Ready -l app.kubernetes.io/part-of=cilium pod --timeout=${{ env.timeout }}
kubectl rollout -n kube-system status deploy/coredns --timeout=${{ env.timeout }}
# To make sure that cilium envoy CRs are available
kubectl wait --for condition=Established crd/ciliumenvoyconfigs.cilium.io --timeout=${{ env.timeout }}
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/conformance-ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,8 @@ jobs:
--set ingressController.enabled=true \
--set ingressController.loadbalancerMode=dedicated
kubectl wait -n kube-system --for=condition=Ready --all pod --timeout=${{ env.timeout }}
kubectl wait -n kube-system --for=condition=Ready -l app.kubernetes.io/part-of=cilium pod --timeout=${{ env.timeout }}
kubectl rollout -n kube-system status deploy/coredns --timeout=${{ env.timeout }}
# To make sure that cilium envoy CRs are available
kubectl wait --for condition=Established crd/ciliumenvoyconfigs.cilium.io --timeout=${{ env.timeout }}
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/conformance-k8s-network-policies.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,9 @@ jobs:
--set hubble.enabled=true \
--set hubble.metrics.enabled="{dns,drop,tcp,flow,port-distribution,icmp,http}"
kubectl wait -n kube-system --for=condition=Ready --all pod --timeout=5m
kubectl wait -n kube-system --for=condition=Ready -l app.kubernetes.io/part-of=cilium pod --timeout=${{ env.timeout }}
kubectl rollout -n kube-system status deploy/coredns --timeout=${{ env.timeout }}
# To make sure that cilium CRD is available (default timeout is 5m)
# https://github.com/cilium/cilium/blob/master/operator/crd.go#L34
kubectl wait --for condition=Established crd/ciliumnetworkpolicies.cilium.io --timeout=5m
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/tests-smoke-ipv6.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,9 @@ jobs:
--set ipv6NativeRoutingCIDR=2001:db8:1::/64 \
--set ingressController.enabled=true
kubectl wait -n kube-system --for=condition=Ready --all pod --timeout=${{ env.TIMEOUT }}
kubectl wait -n kube-system --for=condition=Ready -l app.kubernetes.io/part-of=cilium pod --timeout=5m
kubectl rollout -n kube-system status deploy/coredns --timeout=5m
# To make sure that cilium CRD is available (default timeout is 5m)
kubectl wait --for condition=Established crd/ciliumnetworkpolicies.cilium.io --timeout=5m
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/tests-smoke.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,9 @@ jobs:
--set hubble.metrics.enabled="{dns,drop,tcp,flow,port-distribution,icmp,http}" \
--set ingressController.enabled=true
kubectl wait -n kube-system --for=condition=Ready --all pod --timeout=5m
kubectl wait -n kube-system --for=condition=Ready -l app.kubernetes.io/part-of=cilium pod --timeout=5m
kubectl rollout -n kube-system status deploy/coredns --timeout=5m
# To make sure that cilium CRD is available (default timeout is 5m)
# https://github.com/cilium/cilium/blob/master/operator/crd.go#L34
kubectl wait --for condition=Established crd/ciliumnetworkpolicies.cilium.io --timeout=5m
Expand Down

0 comments on commit a2b5605

Please sign in to comment.