-
Notifications
You must be signed in to change notification settings - Fork 715
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
Add dry run e2e tests #2673
Add dry run e2e tests #2673
Conversation
fadb8d6
to
fed1471
Compare
/test pull-kubeadm-kinder-verify |
fed1471
to
e61654b
Compare
e61654b
to
0318c97
Compare
/cc @neolit123 |
@@ -156,6 +156,18 @@ jobGroups: | |||
- kubernetesVersion: -2 | |||
- kubernetesVersion: -3 | |||
|
|||
- name: dryrun-regular |
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.
thanks for the PR @SataQiu
as noted in #2653
i think we can call this workflow group just dryrun
and make it also include upgrade
allocate a kinder cluster with 1 node
call kubeadm init --dry-run on it (add --upload-certs and other special flags, how to test external CA?)
call kubeadm join --dry-run on it (add --control-plane, --certificate-key and other flags?)
call kubeadm reset --dry-run on it
call kubeadm init ... to create an actual k8s node
call kubeadm upgrade apply --dry-run to dry run the "primary node" upgrade of this node
call kubeadm upgrade node --dry-run to dry run the "secondary node" upgrade of this node
cmd: kinder | ||
args: | ||
- do | ||
- kubeadm-init |
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.
instead of using the kinder wrapped kubeadm commands for init/join/reset
i think it might be possible to just create 1 CP node (0 workers).
and have a bash script that calls all kubeadm commands on the same node - example:
https://github.com/kubernetes/kubeadm/blob/main/kinder/ci/workflows/unversioned-kubelet-cm-tasks.yaml#L69-L75
docker exec {{ .vars.clusterName }}-control-plane-1 kubeadm init ... --dry-run .... || exit 1
docker exec {{ .vars.clusterName }}-control-plane-1 kubeadm ... || exit 1
...
did you try that?
this would also avoid adding the --kubeadm-dryrun=true
flag in kinder. not that it's a problem.
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.
instead of using the kinder wrapped kubeadm commands for
init/join/reset
i think it might be possible to just create 1 CP node (0 workers).and have a bash script that calls all kubeadm commands on the same node - example: https://github.com/kubernetes/kubeadm/blob/main/kinder/ci/workflows/unversioned-kubelet-cm-tasks.yaml#L69-L75
docker exec {{ .vars.clusterName }}-control-plane-1 kubeadm init ... --dry-run .... || exit 1 docker exec {{ .vars.clusterName }}-control-plane-1 kubeadm ... || exit 1 ...
did you try that?
this would also avoid adding the
--kubeadm-dryrun=true
flag in kinder. not that it's a problem.
Thanks @neolit123
This makes sense, I'll try it later.
0318c97
to
803155e
Compare
@neolit123 It seems much cleaner to use |
args: | ||
- -c | ||
- | | ||
docker exec {{ .vars.clusterName }}-control-plane-1 kubeadm init --ignore-preflight-errors=Swap,SystemVerification,FileContent--proc-sys-net-bridge-bridge-nf-call-iptables --kubernetes-version={{ .vars.kubernetesVersion }} --dry-run=true --v={{ .vars.kubeadmVerbosity }} || exit 1 |
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.
we can define the --ignore-preflight-errors...
as a variable under vars
and use it in a few places.
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
- do | ||
- kubeadm-join | ||
- --name={{ .vars.clusterName }} | ||
- --loglevel=debug | ||
- --kubeadm-verbosity={{ .vars.kubeadmVerbosity }} |
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.
i guess this is fine for now, we should change it to not require access to the cluster-info config map.
as per the discussion here:
#2653 (comment)
after that we can possibly have a single CP node on which we can run all dry-run commands that we want instead of having 1CP1W and doing an actual join.
803155e
to
d89fff7
Compare
Signed-off-by: SataQiu <[email protected]>
d89fff7
to
70534f3
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.
thanks, @SataQiu
we need a test infra PR as well to get the initial test job running.
i've enumerated the remaining tasks here:
#2653 (comment)
/lgtm
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: neolit123, SataQiu 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 |
xref: #2653
edit: neolit123 (fixes -> xref)