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).
Use the default kubeconfig if --kubeconfig isn't provided.
Create a profile from the kubeconfig context used to install Spaces, and activate it similarly to up profile set space (see above).
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.
If --kubeconfig is provided, maintain the current behavior and use the default context from that kubeconfig.
If --profile is provided, use the profile with that name. Fail with an error if it is not a Spaces profile.
If neither --kubeconfig nor --profile are provided, use the default profile. Fail with an error if it is not a Spaces profile.
All other subcommands
Fail with an error if the default profile is a Spaces profile.
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
, andview
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. runningup space profile create
andup space profile use
beforehand).--kubeconfig
isn't provided.up profile set space
(see above).up space upgrade
andup space destroy
Existing subcommands. We'll keep their
--kubeconfig
flags for backwards compatibility, and add--profile
flags for overriding the default profile.--kubeconfig
is provided, maintain the current behavior and use the default context from that kubeconfig.--profile
is provided, use the profile with that name. Fail with an error if it is not a Spaces profile.--kubeconfig
nor--profile
are provided, use the default profile. Fail with an error if it is not a Spaces profile.All other subcommands
Fail with an error if the default profile is a Spaces profile.