k8s

package
v1.0.29 Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LabelWorkerNode

func LabelWorkerNode(cluster *types.Cluster, worker *types.Worker, logger *utils.Logger) error

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

func LogFiles(logger *utils.Logger)

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.

Jump to

Keyboard shortcuts

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