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

unmanaged-cluster: support no CNI and failed CNI #2941

Merged
merged 1 commit into from
Jan 27, 2022
Merged

unmanaged-cluster: support no CNI and failed CNI #2941

merged 1 commit into from
Jan 27, 2022

Conversation

joshrosso
Copy link
Contributor

@joshrosso joshrosso commented Jan 26, 2022

What this PR does / why we need it

This commit adds support for creating clusters without installing CNI. It
also enables cluster creation to complete successfully when a CNI
package fails to resolve.

For creating clusters without CNI, a user may set the CNI configuration
value to "none". For example, cluster creation can occur as follows:

tanzu uc create testme --cni=none

Users will receive a warning message that no CNI was installed, and the
installation will complete.

For when a CNI is specified but is invalid, for example:

tanzu uc create testme --cni=beepboopnotreal

Users will receive a warning message that no CNI package was found, but
the install will still complete. This is because the cluster is still
successfully started and the user could choose to remedy or troubleshoot
after bootstrapping.

Details for the Release Notes (PLEASE PROVIDE)

unmanaged-clusters support none for CNI value, preventing an install of CNI after cluster creation.

Which issue(s) this PR fixes

Fixes: #2939
Fixes: #2940

Describe testing done for PR

CNI does not install when set to none ✔️.

image

CNI skipped when cannot resolve package (rather than fail) ✔️

image

CNI Selection still works as expected ✔️

image

Special notes for your reviewer

None

@joshrosso joshrosso requested a review from a team as a code owner January 26, 2022 02:07
@joshrosso joshrosso requested review from stmcginnis and jpmcb January 26, 2022 16:14
Copy link
Contributor

@jpmcb jpmcb left a comment

Choose a reason for hiding this comment

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

I'm guessing you didn't mean to commit either of these files?

  • cli/cmd/plugin/unmanaged-cluster/test.png
  • docs/site/.hugo_build.lock
  • cli/cmd/plugin/unmanaged-cluster/--help

Otherwise, code in tanzu.go looking good!

@jpmcb
Copy link
Contributor

jpmcb commented Jan 26, 2022

Default behavior still works ✅

image

Selecting none CNI works ✅

image

❯ k get pods -A
NAMESPACE            NAME                                                 READY   STATUS    RESTARTS   AGE
kube-system          coredns-558bd4d5db-4r8bj                             0/1     Pending   0          116s
kube-system          coredns-558bd4d5db-fp9jd                             0/1     Pending   0          116s
kube-system          etcd-test-cluster-control-plane                      1/1     Running   0          118s
kube-system          kube-apiserver-test-cluster-control-plane            1/1     Running   0          118s
kube-system          kube-controller-manager-test-cluster-control-plane   1/1     Running   0          118s
kube-system          kube-proxy-6m6pf                                     1/1     Running   0          116s
kube-system          kube-scheduler-test-cluster-control-plane            1/1     Running   0          118s
local-path-storage   local-path-provisioner-547f784dff-xg4x8              0/1     Pending   0          116s
tkg-system           kapp-controller-f7dbbcb4f-hp5jl                      1/1     Running   0          113s

Non-resolving CNI works ✅

image

Setting a valid CNI works ✅

image

This is amazing!!!

This commit adds support for creating clusters without installing CNI. It
also enables cluster creation to complete successfully when a CNI
package fails to resolve.

For creating clusters without CNI, a user may set the CNI configuration
value to "none". For example, cluster creation can occur as follows:

tanzu uc create testme --cni=none

Users will receive a warning message that no CNI was installed, and the
installation will complete.

For when a CNI is specified but is invalid, for example:

tanzu uc create testme --cni=beepboopnotreal

Users will receive a warning message that no CNI package was found, but
the install will still complete. This is because the cluster is still
successfully started and the user could choose to remedy or troubleshoot
after bootstrapping.

Signed-off-by: joshrosso <rossoj@vmware.com>
@joshrosso
Copy link
Contributor Author

I'm guessing you didn't mean to commit either of these files?

  • cli/cmd/plugin/unmanaged-cluster/test.png
  • docs/site/.hugo_build.lock
  • cli/cmd/plugin/unmanaged-cluster/--help

Otherwise, code in tanzu.go looking good!

I did not, removed those files 👍.

Ready for approve/merge.

@jpmcb jpmcb merged commit 396f06d into vmware-tanzu:main Jan 27, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
3 participants