Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewCommand ¶
NewCommand creates a new Cobra command and a Runner to handle the command's logic, and adds flags to the command for workspace, resource group, environment name, force and context.
func ValidateArgs ¶
func ValidateArgs() cobra.PositionalArgs
ValidateArgs checks if the number of arguments passed to the command is between 1 and 2, and if the first argument is "kubernetes", and returns an error if either of these conditions are not met.
Types ¶
type Runner ¶
type Runner struct {
ConfigHolder *framework.ConfigHolder
ConnectionFactory connections.Factory
Workspace *workspaces.Workspace
Force bool
ConfigFileInterface framework.ConfigFileInterface
Output output.Interface
HelmInterface helm.Interface
KubernetesInterface kubernetes.Interface
}
Runner is the runner implementation for the `rad workspace create` command.
func (*Runner) Run ¶
Run creates a workspace and sets it as the current workspace, returning an error if any occurs during the process."
func (*Runner) Validate ¶
Validate checks if the given workspace name is valid, if the given Kubernetes context is valid, if the Radius control plane is installed on the target platform, if the workspace already exists, if the user has specified the --force flag, if the given resource group and environment exist, and returns an error if any of these checks fail.