Skip to content

Add import subcommand #2

Description

@KevinFCormier

Currently, several cm commands work with any logged-in kubeconfig context:

  • cm use
  • cm with

And a couple more work but without support for copying the password:

  • cm acm
  • cm console

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:

  1. Make it easy to give the context a short, meaningful, memorable name by renaming the context for you
  2. 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:
    • cm pw
    • cm creds
  3. (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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions