Documentation
¶
Index ¶
- func DeleteContext(contextName string) error
- func ManagementContextName() string
- func ParseVirtualClusterInstanceContextName(contextName string) (virtualClusterInstance, projectName string, ok bool)
- func PrintKubeConfigTo(options ContextOptions, writer io.Writer) error
- func SpaceContextName(clusterName, namespaceName string) string
- func SpaceInstanceContextName(projectName, spaceInstanceName string) string
- func UpdateKubeConfig(options ContextOptions, cfg *config.CLI) error
- func VirtualClusterInstanceContextName(projectName, virtualClusterInstance string) string
- type ContextOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeleteContext ¶
DeleteContext deletes the context with the given name from the kube config
func ManagementContextName ¶
func ManagementContextName() string
func ParseVirtualClusterInstanceContextName ¶ added in v0.36.0
func ParseVirtualClusterInstanceContextName(contextName string) (virtualClusterInstance, projectName string, ok bool)
ParseVirtualClusterInstanceContextName parses a context name produced by VirtualClusterInstanceContextName, i.e. vcluster-platform-vcluster_{instance}_{project}. Splitting on the first underscore is safe because Kubernetes object names (instance, project) never contain underscores.
func PrintKubeConfigTo ¶
func PrintKubeConfigTo(options ContextOptions, writer io.Writer) error
PrintKubeConfigTo prints the given config to the writer
func SpaceContextName ¶
func UpdateKubeConfig ¶
func UpdateKubeConfig(options ContextOptions, cfg *config.CLI) error
UpdateKubeConfig updates the kube config and adds the virtual cluster context
Types ¶
Click to show internal directories.
Click to hide internal directories.