kubernetes

package
v0.60.0 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2026 License: Apache-2.0 Imports: 21 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 new Runner object, which is used to install Radius onto a Kubernetes cluster. It also adds flags to the command for setting values, reinstalling, and specifying a Helm chart.

Types

type Runner

type Runner struct {
	Helm                helm.Interface
	Output              output.Interface
	ConnectionFactory   connections.Factory
	KubernetesInterface cli_kubernetes.Interface

	KubeContext string

	// Radius
	Chart   string
	Set     []string
	SetFile []string

	// Contour
	ContourDisabled bool
	ContourChart    string
	ContourSet      []string
	ContourSetFile  []string

	Reinstall bool

	// Preview selects the new Radius.Core/environments resource type (with the default recipe pack)
	// for the default environment instead of the legacy Applications.Core/environments type.
	Preview bool

	// RadiusCoreClientFactory is the Radius.Core (v20250801preview) client factory used to create the
	// default environment and recipe pack when Preview is set. It is initialized lazily from the
	// workspace when nil; tests inject a fake factory.
	RadiusCoreClientFactory *corerpv20250801.ClientFactory
}

Runner is the Runner implementation for the `rad install kubernetes` command.

func NewRunner

func NewRunner(factory framework.Factory) *Runner

NewRunner creates a new Runner struct with Helm, Output, ConnectionFactory and KubernetesInterface fields initialized from the supplied factory.

func (*Runner) Run

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

Run checks if a Radius installation exists, and if it does, it either skips the installation or reinstalls it depending on the "Reinstall" flag. If no installation is found, it installs the version of Radius corresponding to the cli version. After a successful install or reinstall it ensures the default resource group and environment exist, creating each only when it is missing so existing user customizations are preserved. It returns any errors that occur during these steps.

func (*Runner) Validate

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

Validate runs validation for the `rad install kubernetes` command.

Jump to

Keyboard shortcuts

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