Currently, several cm commands work with any logged-in kubeconfig context:
And a couple more work but without support for copying the password:
For example, today you can run:
cm console default/api-birsan-hub-dev-dev06-red-chesterfield-com:6443/kube:admin
cm with default/api-birsan-hub-dev-dev06-red-chesterfield-com:6443/kube:admin <command>
cm use default/api-birsan-hub-dev-dev06-red-chesterfield-com:6443/kube:admin
These are not terribly useful with long auto-generated context names. One can rename their current context fairly easily by running oc config rename-context $(oc config current-context) <new-name>, but this is still a lot to type and would only be useful until the login session expires. An import subcommand would:
- Make it easy to give the context a short, meaningful, memorable name by renaming the context for you
- Store the password in the same way Lifeguard stores credentials for ClusterClaims. This would bring
cm console and cm acm to their full potential and unlock more subcommands:
- (Optionally) Create a ServiceAccount on the imported cluster or automatically log-in using the saved password when the token expires. (The latter may be more viable since configuration of the ServiceAccount depends on what kind of access the user has on the imported cluster.) This would make the
cm use and cm with subcommands equally as useful for imported clusters, since for ClusterClaims on the ClusterPool host, these commands ensure the clusters are running and the user is logged in.
Currently, several
cmcommands work with any logged-in kubeconfig context:cm usecm withAnd a couple more work but without support for copying the password:
cm acmcm consoleFor example, today you can run:
cm console default/api-birsan-hub-dev-dev06-red-chesterfield-com:6443/kube:admincm with default/api-birsan-hub-dev-dev06-red-chesterfield-com:6443/kube:admin <command>cm use default/api-birsan-hub-dev-dev06-red-chesterfield-com:6443/kube:adminThese are not terribly useful with long auto-generated context names. One can rename their current context fairly easily by running
oc config rename-context $(oc config current-context) <new-name>, but this is still a lot to type and would only be useful until the login session expires. Animportsubcommand would:cm consoleandcm acmto their full potential and unlock more subcommands:cm pwcm credscm useandcm withsubcommands equally as useful for imported clusters, since for ClusterClaims on the ClusterPool host, these commands ensure the clusters are running and the user is logged in.