-
Notifications
You must be signed in to change notification settings - Fork 884
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Install calico for tests #2820
Install calico for tests #2820
Conversation
@AndersBennedsgaard can you review this PR? |
chmod +x ./tests/gh-actions/install_calico.sh | ||
./tests/gh-actions/install_calico.sh |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No reason to change the file modes and leaving the git work tree in a "dirty" state. You could just run chmod +x ./tests/gh-actions/install_calico.sh
, commit that to the repository (like what is done with the other scripts in tests/gh-actions/
), and use
run: ./tests/gh-actions/install_calico.sh
As an alternative, you can skip the chmod +x
entirely, and just run the Bash script using bash
:
run: |
bash ./tests/gh-actions/install_calico.sh
I personally prefer this, since I am not a fan of committing executables in git repositories, but I guess that the former is the preferred way in Kubeflow 🤷♂️
tests/gh-actions/install_calico.sh
Outdated
kubectl create -f https://raw.githubusercontent.com/projectcalico/calico/v3.26.0/manifests/tigera-operator.yaml | ||
kubectl create -f https://raw.githubusercontent.com/projectcalico/calico/v3.26.0/manifests/custom-resources.yaml | ||
|
||
kubectl wait --for=condition=Ready pods --all --namespace=tigera-operator --timeout 300s |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This does not ensure that Calico is in a running state. This only ensures that the Tigera operator is.
Also: you should generally speaking not wait for Pods to be ready, but instead wait for the controlling Deployment, DaemonSet, StatefulSet, etc. to report that it is ready.
I got the following to work on my machine:
kubectl wait --for=condition=Ready pods --all --namespace=tigera-operator --timeout 300s | |
kubectl rollout status deployment -n tigera-operator tigera-operator --timeout 60s | |
# TODO: use 'kubectl wait --for=create namespace/calico-system' when https://github.com/kubernetes/kubernetes/pull/125868 is released | |
echo 'Waiting for namespace "calico-system" to be created' | |
start=$(date +%s) | |
while [ -z "$(kubectl get ns calico-system 2>/dev/null)" ]; do | |
sleep 1 | |
now=$(date +%s) | |
[ $((now - start)) -le 60 ] || { echo "timeout waiting for calico-system namespace" && exit 1; } | |
done | |
kubectl rollout status deployment -n calico-system calico-typha --timeout 60s | |
kubectl rollout status deployment -n calico-system calico-kube-controllers --timeout 60s | |
kubectl rollout status daemonset -n calico-system calico-node --timeout 60s | |
kubectl rollout status daemonset -n calico-system csi-node-driver --timeout 60s |
#2718 (comment) . Based on this comment, we can close this PR. Let me know if you have any concerns. @juliusvonkohout |
1c6eec9
to
569b304
Compare
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
@juliusvonkohout , When I commit to this, each time different tests fail. Do you know any reason for this? |
Signed-off-by: hansinikarunarathne <[email protected]> Signed-off-by: hansinikarunarathne <[email protected]>
Signed-off-by: hansinikarunarathne <[email protected]> Signed-off-by: hansinikarunarathne <[email protected]>
Signed-off-by: hansinikarunarathne <[email protected]> Signed-off-by: hansinikarunarathne <[email protected]>
Signed-off-by: hansinikarunarathne <[email protected]> Signed-off-by: hansinikarunarathne <[email protected]>
Signed-off-by: hansinikarunarathne <[email protected]> Signed-off-by: hansinikarunarathne <[email protected]>
Signed-off-by: hansinikarunarathne <[email protected]> Signed-off-by: hansinikarunarathne <[email protected]>
Signed-off-by: hansinikarunarathne <[email protected]> Signed-off-by: hansinikarunarathne <[email protected]>
Signed-off-by: hansinikarunarathne <[email protected]> Signed-off-by: hansinikarunarathne <[email protected]>
Signed-off-by: hansinikarunarathne <[email protected]>
Signed-off-by: hansinikarunarathne <[email protected]>
Signed-off-by: hansinikarunarathne <[email protected]>
Signed-off-by: hansinikarunarathne <[email protected]>
Signed-off-by: hansinikarunarathne <[email protected]>
Signed-off-by: hansinikarunarathne <[email protected]>
Signed-off-by: hansinikarunarathne <[email protected]>
Signed-off-by: hansinikarunarathne <[email protected]>
Signed-off-by: hansinikarunarathne <[email protected]>
Signed-off-by: hansinikarunarathne <[email protected]>
Signed-off-by: hansinikarunarathne <[email protected]>
Signed-off-by: hansinikarunarathne <[email protected]>
Signed-off-by: hansinikarunarathne <[email protected]>
Signed-off-by: hansinikarunarathne <[email protected]>
Signed-off-by: hansinikarunarathne <[email protected]>
Signed-off-by: hansinikarunarathne <[email protected]>
489e44f
to
0144c08
Compare
I add the calico plugging to enable networkpolicies . Let me know any concerns you guys have? |
We can close this PR. |
Pull Request Template for Kubeflow manifests Issues
✏️ A brief description of the changes
🐛 If this PR is related to an issue, please put the link to the issue here.
✅ Contributor checklist
DCO
check)cla/google
check)