setup

package
v0.1.0-rc.1 Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2026 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateImagePullSecret

func CreateImagePullSecret(ctx context.Context, c client.Client, namespace, token string) (string, error)

CreateImagePullSecret creates a dockerconfigjson Secret for ghcr.io. token is a GitHub Personal Access Token with read:packages scope.

func EnsureNamespace

func EnsureNamespace(ctx context.Context, c client.Client, name string, out io.Writer) (bool, error)

EnsureNamespace creates a namespace if it doesn't exist. Returns true if the namespace was created by this call (false if it already existed).

func NewCommand

func NewCommand(version string) *cobra.Command

NewCommand returns the "setup" cobra command. version is the running binary version and is threaded through to init/upgrade operations.

func RunInit

func RunInit(
	version string,
	image, imagePullSecret, skipPhases string, autoApprove bool,
	configFlags *kubeconfig.ConfigFlags, versionOverride string,
	in io.Reader, out io.Writer,
) error

runInit executes the init phases sequentially.

func RunReset

func RunReset(
	skipPhases string, autoApprove bool,
	configFlags *kubeconfig.ConfigFlags,
	in io.Reader, out io.Writer,
) error

runReset executes the reset phases in reverse order.

func WaitForNamespaceDeletion

func WaitForNamespaceDeletion(ctx context.Context, c client.Client, name string, out io.Writer)

waitForNamespaceDeletion polls until a namespace is fully removed.

Types

type SetupStatus

type SetupStatus struct {
	// Installed is true when all required components are present and ready.
	Installed  bool                  `json:"installed"`
	Components SetupStatusComponents `json:"components"`
}

SetupStatus is the JSON output structure for ncrectl setup status.

type SetupStatusComponents

type SetupStatusComponents struct {
	CRECRDs         bool `json:"creCRDs"`
	CREController   bool `json:"creController"`
	KubeflowTrainer bool `json:"kubeflowTrainer"`
	LogProfiles     bool `json:"logProfiles"`
	GPUOperator     bool `json:"gpuOperator"`
}

SetupStatusComponents reports the status of each individual component.

Jump to

Keyboard shortcuts

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