Skip to content
This repository has been archived by the owner on Jun 28, 2024. It is now read-only.

ci/openshift-ci: Tweak test.sh to run with kubernetes #5799

Merged
merged 3 commits into from
Jan 19, 2024

Conversation

ldoktor
Copy link
Contributor

@ldoktor ldoktor commented Dec 6, 2023

Plain kubernetes do not support services and such, let's modify our test.sh (and related) to allow deploying and checking kata there, which might help testing things locally with kcli.

@katacontainersbot katacontainersbot added the size/medium Average sized task label Dec 6, 2023
@@ -40,13 +40,29 @@ hello_msg='Hello World'
oc exec ${pod} -- sh -c "echo $hello_msg > $hello_file"

info "Creating the service and route"
oc apply -f ${script_dir}/smoke/service.yaml
sleep 60
if oc apply -f ${script_dir}/smoke/service.yaml; then
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The service API (https://kubernetes.io/docs/concepts/services-networking/service/) should work with kcli too. Maybe there is a firewall blocking the port 80 on the VM?

Copy link
Contributor Author

@ldoktor ldoktor Dec 13, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Services are supported, but routes are not. We can use ingress, but that one requires ingress controller, so using another pod seems simpler for the purpose of pod execution test.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK I found another way using service of type "NodePort", let me know which way you prefer.

Copy link
Contributor

@wainersm wainersm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool! I liked the hostport approach better!

@wainersm
Copy link
Contributor

@ldoktor missing the Fixes. At some point you will be automatically putting it! :)

@ldoktor
Copy link
Contributor Author

ldoktor commented Dec 14, 2023

Squashed and rebased, no code changes. (PS: I prefer the 2 pod solution, but anything works for me :D)

Copy link
Member

@gkurz gkurz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @ldoktor ! I made a few comments but nothing blocking.

.ci/openshift-ci/run_smoke_test.sh Show resolved Hide resolved
.ci/openshift-ci/run_smoke_test.sh Show resolved Hide resolved
.ci/openshift-ci/run_smoke_test.sh Outdated Show resolved Hide resolved
.ci/openshift-ci/run_smoke_test.sh Show resolved Hide resolved
Plain kubernetes do not support routes and projects. Let's modify the
deploy scripts to use generic alternatives to simplify local
development.

Fixes: kata-containers#5803

Signed-off-by: Lukáš Doktor <[email protected]>
the 10s sleep-time seems quite long and checking more often doen't waste
resources extensively.

Signed-off-by: Lukáš Doktor <[email protected]>
the hardcoded 60s wait is often unnecessarily too long and recently we
added a busy-loop using "curl --retry". Let's leverage that and increase
the deadline to 60s.

Signed-off-by: Lukáš Doktor <[email protected]>
@ldoktor
Copy link
Contributor Author

ldoktor commented Jan 18, 2024

Rebased on top of master, fixed the styling issues found by @gkurz and added 2 (optional) commits to include the unrelated changes. Let me know if I should remove them but they should slightly speedup the prep steps.

@wainersm
Copy link
Contributor

/test

@gkurz
Copy link
Member

gkurz commented Jan 19, 2024

Rebased on top of master, fixed the styling issues found by @gkurz and added 2 (optional) commits to include the unrelated changes. Let me know if I should remove them but they should slightly speedup the prep steps.

This PR is just fine ! Thanks @ldoktor !

@gkurz
Copy link
Member

gkurz commented Jan 19, 2024

/test-s390x-main

@gkurz
Copy link
Member

gkurz commented Jan 19, 2024

/retest-s390x-main

@gkurz
Copy link
Member

gkurz commented Jan 19, 2024

/retest

@gkurz gkurz merged commit cfea72b into kata-containers:main Jan 19, 2024
9 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
size/medium Average sized task
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants