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
test/e2e_kubeadm: add test for the kubeadm:cluster-admins CRB #121674
test/e2e_kubeadm: add test for the kubeadm:cluster-admins CRB #121674
Conversation
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: neolit123 The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
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.
tested locally:
# create a kubeadm cluster with artifacts from latest HEAD
# ...
# build the e2e suite
make WHAT=test/e2e_kubeadm/e2e_kubeadm.test
# run the suite
sudo ./_output/local/go/bin/e2e_kubeadm.test --kubeconfig /etc/kubernetes/admin.conf --ginkgo.focus=admin --ginkgo.v
Nov 1 16:33:01.830: INFO: The --provider flag is not set. Continuing as if --provider=skeleton had been used.
Running Suite: E2EKubeadm suite - /home/lubo/go/src/k8s.io/kubernetes
=====================================================================
Random Seed: 1698849181 - will randomize all specs
Will run 1 of 38 specs
SSSSSSSSSSSSS
------------------------------
[sig-cluster-lifecycle] [area-kubeadm] admin CRB must exist and be bound to the cluster-admin ClusterRole
test/e2e_kubeadm/admin_test.go:49
STEP: Creating a kubernetes client @ 11/01/23 16:33:01.838
Nov 1 16:33:01.838: INFO: >>> kubeConfig: /etc/kubernetes/admin.conf
Nov 1 16:33:01.875: INFO: Waiting up to 7m0s for all (but 0) nodes to be ready
• [0.044 seconds]
------------------------------
SSSSSSSSSSSSSSSSSSSSSSSS
Ran 1 of 38 Specs in 0.050 seconds
SUCCESS! -- 1 Passed | 0 Failed | 0 Pending | 37 Skipped
PASS
/retest |
09f0c3b
to
da999c3
Compare
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.
/lgtm
/hold
feel free to unhold pls.
test/e2e_kubeadm/admin_test.go
Outdated
} | ||
|
||
// If the version is older than the version when this feature was added, skip this test | ||
minVer := version.MustParseSemantic("v1.29.0-alpha.2.186+30ed50d32e3557") |
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.
How about moving ahead the version (05076de57fc49f
) a little bit when the flaky issue was fixed?
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.
makes sense, updating.
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.
done.
LGTM label has been added. Git tree hash: 629b5d64d83bc62adae427d5e1b16391f0e8bc8f
|
Add a test that checks if the CRB (kubeadm:cluster-admins) used for binding admin.conf file users (part of the kubeadm:cluster-admins Group) to the "cluster-admins" ClusterRole exists in kubeadm clusters. It does that only for versions newer than the version when this feature was added.
da999c3
to
4c53221
Compare
/lgtm thanks @neolit123 ! |
LGTM label has been added. Git tree hash: 902e787ac29b19fed03ce6bb6296b85a746fc80f
|
/retest |
logged ticket for flakes |
What type of PR is this?
/kind feature
/area test
What this PR does / why we need it:
Add a test that checks if the CRB (kubeadm:cluster-admins) used for binding admin.conf file users (part of the kubeadm:cluster-admins Group) to the "cluster-admins" ClusterRole exists in kubeadm clusters.
It does that only for versions newer than the version when this feature was added.
Which issue(s) this PR fixes:
xref kubernetes/kubeadm#2414
Special notes for your reviewer:
NONE
Does this PR introduce a user-facing change?
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.: