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.
Description of change
There's several small usability fixes for the k8s CLI:
The last change means that:
-- cloud only accepts a cloud name
-- you can't specify just a region with --region unless for gke or aks
There's a slight incompatibility with 2.6 but the logical way to use the options is the what's supported; only the pathological corner cases have been removed. It's now less confusing. Plus using microk8s or GKE/AWS or CDK on a supported cloud it's not an issue anyway; it's only for cases where the undercloud cannot be detected.
QA steps
juju remove-unit and check the error message
add-k8s on a GKE cluster
add-k8s on microk8s
add-k8s on CDK without node labels with and without an existing storage class
(testing the combinations of --cloud and --region)
Bug reference
https://bugs.launchpad.net/juju/+bug/1847149