Documentation
¶
Index ¶
- func CreateImagePullSecret(ctx context.Context, c client.Client, ...) (string, bool, error)
- func EnsureNamespace(ctx context.Context, c client.Client, name string, out io.Writer) (bool, error)
- func NewCommand(version string) *cobra.Command
- func RunInit(version string, image, imagePullSecret, skipPhases string, autoApprove bool, ...) error
- func RunReset(skipPhases string, autoApprove bool, configFlags *kubeconfig.ConfigFlags, ...) error
- func WaitForNamespaceDeletion(ctx context.Context, c client.Client, name string, out io.Writer)
- func WorkloadPullSecretName(resourceName string) string
- type SetupStatus
- type SetupStatusComponents
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateImagePullSecret ¶
func CreateImagePullSecret(ctx context.Context, c client.Client, namespace, secretName, server, username, password string) (string, bool, error)
CreateImagePullSecret creates a dockerconfigjson Secret for the given registry. server is the registry hostname (e.g. "nvcr.io", "ghcr.io"). username is the registry username (e.g. "$oauthtoken" for NGC, "token" for GHCR). password is the registry password or API key. secretName is the name to give the created Secret. Returns (secretName, wasCreated, error) where wasCreated is true only when a new Secret was created — false means an existing Secret was updated. Callers must only delete the secret on rollback when wasCreated is true.
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 ¶
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 ¶
waitForNamespaceDeletion polls until a namespace is fully removed.
func WorkloadPullSecretName ¶
WorkloadPullSecretName returns the name of the workload image pull secret for a given Certification or WorkloadRun. Deriving from the resource name prevents concurrent runs in the same namespace from fighting over a single fixed name.
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"`
// contains filtered or unexported fields
}
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"`
// DCGM is optional. Only the diagnostics/dcgm-level4 category needs it,
// so it does not count toward Installed.
DCGM bool `json:"dcgm"`
}
SetupStatusComponents reports the status of each individual component.