create

package
v0.28.0-rc1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 6, 2023 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCommand

func NewCommand(factory framework.Factory) (*cobra.Command, framework.Runner)

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 NewRunner

func NewRunner(factory framework.Factory) *Runner

NewRunner creates a new instance of the `rad workspace create` runner.

func (*Runner) Run

func (r *Runner) Run(ctx context.Context) error

Run creates a workspace and sets it as the current workspace, returning an error if any occurs during the process."

func (*Runner) Validate

func (r *Runner) Validate(cmd *cobra.Command, args []string) error

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL