Documentation ¶
Index ¶
- Constants
- Variables
- func ContextName(cluster *infrastructure.KubernetesCluster) string
- func IsExtensionNotFoundError(err error) bool
- func RemoveClusterFromKubeConfig(kubeconfigPath, clusterContext string) error
- func SetContextOrganization(kubeconfigPath string, contextName string, organization string) error
- func SetContextProject(kubeconfigPath string, contextName string, project string) error
- type Extension
Constants ¶
View Source
const (
NctlExtensionContext = "nctl"
)
Variables ¶
View Source
var (
// ErrExtensionNotFound describes a missing extension in the kubeconfig
ErrExtensionNotFound extensionError = "nctl config not found"
)
Functions ¶
func ContextName ¶
func ContextName(cluster *infrastructure.KubernetesCluster) string
ContextName returns the kubeconfig context name for the given cluster
func IsExtensionNotFoundError ¶
IsExtensionNotFoundError returns true if the nctl config could not be found in the kubconfig context
func RemoveClusterFromKubeConfig ¶
RemoveClusterFromKubeConfig removes the given context from the kubeconfig
func SetContextOrganization ¶
SetContextOrganization sets the given organization in the given context of the kubeconfig
Types ¶
type Extension ¶
type Extension struct { metav1.TypeMeta `json:",inline"` Organization string `json:"organization"` }
Extension is used to store custom information in the kubeconfig context created
func NewExtension ¶
func ReadExtension ¶
Click to show internal directories.
Click to hide internal directories.