diff --git a/controllers/cloudinit/scripts/10-disable-default-cni.sh b/controllers/cloudinit/scripts/10-disable-default-cni.sh index 3cc5ed7..16f35d4 100644 --- a/controllers/cloudinit/scripts/10-disable-default-cni.sh +++ b/controllers/cloudinit/scripts/10-disable-default-cni.sh @@ -10,6 +10,11 @@ fi /capi-scripts/50-wait-apiserver.sh +# todo(eaudetcobello) A bit of a hack, we don't *need* the pod to be ready, +# we just want to make sure the resources are created before we call kubectl +# delete. +microk8s kubectl wait --for=condition=ready pod -l k8s-app=calico-node -n kube-system + microk8s kubectl delete -f "${CNI_YAML}" for file in "${CNI_DIR}"/*; do