kube

package
v1.17.0 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2026 License: MIT Imports: 35 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const NotEnabledMessage = "Kubernetes support is not enabled on this workspace. If it was enabled recently, run 'alpacon login' again to refresh."

NotEnabledMessage is what every 'alpacon kube' path prints when the workspace does not expose the Kubernetes surface.

Variables

View Source
var KubeCmd = &cobra.Command{
	Use:     "kube",
	Aliases: []string{"k8s", "clusters"},
	Short:   "Access Kubernetes clusters",
	Long: `View the Kubernetes clusters registered in the workspace, and write a
kubeconfig context that lets kubectl reach one under your WorkSession.

Clusters are registered by the agent running inside each cluster, not from
the CLI. This group appears only when the server reports that Kubernetes
support is enabled for the workspace; 'alpacon login' and
'alpacon workspace switch' refresh that answer.`,

	Args: cobra.NoArgs,
	RunE: func(cmd *cobra.Command, args []string) error {
		return utils.RequireSubcommand(cmd)
	},
}

Functions

func ApplySurfaceGate

func ApplySurfaceGate(root *cobra.Command, enabled bool)

ApplySurfaceGate replaces KubeCmd under root with a hidden stand-in when the workspace has not reported the Kubernetes surface. It must run before root.Execute: Cobra answers --help and validates arguments before any PreRun hook, and decides suggestions and completion from Hidden alone, so no hook on the real command could cover every way of reaching it. Swapping the command leaves the enabled tree exactly as built.

This is a courtesy, not a control: the server refuses /api/kubernetes/ on its own whenever the surface is off.

Types

This section is empty.

Jump to

Keyboard shortcuts

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