Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LabelWorkerNode ¶
LabelWorkerNode applies labels to the specified worker node using kubectl.
Parameters:
cluster: The cluster containing the worker node. worker: The worker node to label. logger: Logger for output.
Returns:
error: Error if labeling fails.
This function builds the kubeconfig path for the given cluster and worker, then calls the clusterutils.LabelNode function to apply the labels using kubectl.
func LogFiles ¶
LogFiles logs the contents of all kubeconfig files for the current logger session.
Parameters:
logger: Logger for output.
This function reads all files in the kubeconfigs directory for the current logger session and logs their contents using the provided logger.
func SaveKubeConfig ¶
func SaveKubeConfig(client *ssh.Client, cluster types.Cluster, nodeName string, logger *utils.Logger)
SaveKubeConfig retrieves the kubeconfig from a remote cluster node and saves it locally.
Parameters:
client: SSH client connected to the node. cluster: Cluster information. nodeName: Name of the node. logger: Logger for output.
This function fetches the kubeconfig file from the specified cluster node using SSH, patches the address if needed, writes it to a local file, and optionally renames the kubeconfig context if the cluster specifies a custom context name.
Types ¶
This section is empty.