Skip to content
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

[WIP] test case added for kubectl container #710

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

rcmadhankumar
Copy link
Contributor

[CI:TOXENVS] kubectl

@rcmadhankumar rcmadhankumar changed the title [WIP] test case add for kubectl container [WIP] test case added for kubectl container Dec 19, 2024
Comment on lines +847 to +850
("1.30", ("15.7")),
("1.29", ("tumbleweed")),
("1.30", ("tumbleweed")),
("1.31", ("tumbleweed")),
Copy link
Collaborator

Choose a reason for hiding this comment

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

The second element is not a tuple, you're missing the trailing comma:

>>> type(("foo"))
<class 'str'>
>>> type(("foo",))
<class 'tuple'>

That's also why the whole CI is red.

Suggested change
("1.30", ("15.7")),
("1.29", ("tumbleweed")),
("1.30", ("tumbleweed")),
("1.31", ("tumbleweed")),
("1.30", ("15.7",)),
("1.29", ("tumbleweed",)),
("1.30", ("tumbleweed",)),
("1.31", ("tumbleweed",)),

Comment on lines +19 to +21
cluster_name = os.getenv("K3S_CLUSTER_NAME")
control_plane = "k3d-" + cluster_name + "-server-0"
host.run_expect([0], f"k3d kubeconfig get {cluster_name} > kubeconfig")
Copy link
Collaborator

Choose a reason for hiding this comment

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

Please try to make use of something entirely container based without requiring external binaries. We don't have k3d available on all openQA workers and getting it in there will be a major headache for QA. A k3s based container would be much preferred tbh

Copy link
Member

Choose a reason for hiding this comment

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

in theory, you could make an API call to request this, all you might need is curl and a valid token.

@@ -400,6 +402,13 @@ jobs:
echo -e "$(getent ahostsv4 $host | grep STREAM | cut -d' ' -f1 | head -n 1)\t$host" | sudo tee -a /etc/hosts
done

- uses: AbsaOSS/k3d-action@v2
Copy link
Member

Choose a reason for hiding this comment

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

Do we care about actions and where they come from? Since this is a 3rd party repo it could disappear one day.

This action could in theory be just a rancher/k3d container with custom arguments, because it seems that all this action does is download k3d and start a server.

Comment on lines +19 to +21
cluster_name = os.getenv("K3S_CLUSTER_NAME")
control_plane = "k3d-" + cluster_name + "-server-0"
host.run_expect([0], f"k3d kubeconfig get {cluster_name} > kubeconfig")
Copy link
Member

Choose a reason for hiding this comment

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

in theory, you could make an API call to request this, all you might need is curl and a valid token.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants