The current Fluvio profile behavior is somewhat limited and unintuitive, and furthermore it is largely undocumented. Specifically, the behavior when deleting clusters is unexpected. Consider the following set of profiles that were created when signing into Fluvio Cloud and then creating a local Fluvio cluster:
$ fluvio profile view
PROFILE CLUSTER ADDRESS TLS
cloud cloud router.cloud.fluvio.io:9003 Verified
* local local localhost:9003 Disabled
When deleting the local cluster, not only does the local profile persist in the list of profiles, it also remains the active profile. This means that even though there is a perfectly good profile available, any further CLI commands or client connections will attempt to contact the now-nonexistent local cluster.
It seems like it would be more desirable for a profile to be deleted if its cluster is deleted. This is similar to the behavior that minikube has on kubectl contexts when minikube is started and deleted. I am imagining that the desired behavior would look something like the following:
$ fluvio profile view # We have a local cluster and Cloud cluster
* local local localhost:9003 Disabled
cloud cloud router.cloud.fluvio.io:9003 Verified
$ fluvio cluster delete --local # Upon deleting local cluster, remove local profile and switch active profiles
$ fluvio profile view
* cloud cloud router.cloud.fluvio.io:9003 Verified
Action items for this issue:
[ ] Discuss and decide what the desired behavior should be
The current Fluvio profile behavior is somewhat limited and unintuitive, and furthermore it is largely undocumented. Specifically, the behavior when deleting clusters is unexpected. Consider the following set of profiles that were created when signing into Fluvio Cloud and then creating a local Fluvio cluster:
When deleting the local cluster, not only does the local profile persist in the list of profiles, it also remains the active profile. This means that even though there is a perfectly good profile available, any further CLI commands or client connections will attempt to contact the now-nonexistent local cluster.
It seems like it would be more desirable for a profile to be deleted if its cluster is deleted. This is similar to the behavior that minikube has on kubectl contexts when minikube is started and deleted. I am imagining that the desired behavior would look something like the following:
Action items for this issue: