upbound / up

The @upbound CLI
Apache License 2.0
52 stars 41 forks source link

`up` CLI profiles for Spaces #373

Closed branden closed 11 months ago

branden commented 11 months ago

Add support to the up CLI for profiles that point to a Space.

Spaces profiles refer to a context in ~/.kube/config that points to the apiserver for a Space. This is the apiserver that will be used for managing the lifecycle of the Space itself, as well as control planes within the space. Authentication is handled via credentials in the context. Affected subcommands and their changes are listed below.

up profile

Existing subcommand. Each of its subcommands current, list, use, and view will support Spaces profiles. It will also get a new command for creating Spaces profiles:

up profile set space

This accepts an optional --kubeconfig flag. A Spaces profile is created pointing to the default context for the file passed with --kubeconfig, otherwise the default context in the default kubeconfig.

up space init

Existing subcommand. We'll keep its --kubeconfig flag as an override of the default profile, and for creating new profiles as a convenience (vs. running up space profile create and up space profile use beforehand).

up space upgrade and up space destroy

Existing subcommands. We'll keep their --kubeconfig flags for backwards compatibility, and add --profile flags for overriding the default profile.

All other subcommands

Fail with an error if the default profile is a Spaces profile.