This repository has been archived by the owner on Jun 28, 2023. It is now read-only.
Standalone-cluster create using kickstart UI detects clusterconfig file #698
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What this PR does / why we need it
This PR introduces some better UX when using the kickstart UI during
standalone-cluster create
.A user now does not need to specify a cluster name when using the kickstart UI:
This launches the UI and the user can go through it as normal. If the user specifiys a cluster name (which is optional in the UI), the cluster config file will be named by that cluster. So for example, in the UI, when naming a cluster
johns-test-cluster
, the following file is created:If a user does not specify a cluster name, a random UID is still generated for the clusterconfig file (which was the default behavior before this PR).
This now makes the UX of deleting a standalone-cluster much better. A user can now simply specify:
and the command will also look in
.tanzu/clusterconfigs/
for the file namedjohns-test-cluster.yaml
. This is in line with how delete works for users who used the CLI to create a cluster. And maybe in the future, we merge the two experiences so there aren't two different directories for these cluster configs.Which issue(s) this PR fixes
Related to #650
Also ref https://github.com/vmware-tanzu-private/tkg-cli/commit/40cdcc7916793609971fdabef82e6456a6e0a951 for changes made in the
web/server
package to save the cluster config files with the cluster name (which is also related to #Describe testing done for PR
Deployed an AWS standalone cluster using the UI workflow and successfully deleted the cluster without having to specify the
--file
for the cluster config. Also deployed a standalone CAPD cluster using the CLI and there was no deprecation in the UX for this workflow.Special notes for your reviewer
In the future, it would probably be beneficial to have this refactored deeper into the stack so that we aren't managing
.tanzu/clusterconfigs
at the plugin level.