Documentation ¶
Index ¶
- func ClusterID(client kubernetes.Interface) (string, error)
- func DeleteNode(ctx context.Context, client kubernetes.Interface, restconfig *rest.Config, ...) error
- func DrainNode(ctx context.Context, client kubernetes.Interface, node *corev1.Node) error
- func GenerateAddNodeCommand(ctx context.Context, client kubernetes.Interface, token string) (string, error)
- func GenerateAddNodeToken(ctx context.Context, client kubernetes.Interface, nodeRole string) (string, error)
- func GenerateK0sJoinCommand(ctx context.Context, client kubernetes.Interface, roles []string) (string, error)
- func GetNode(ctx context.Context, client kubernetes.Interface, nodeName string) (*types.Node, error)
- func GetNodes(ctx context.Context, client kubernetes.Interface) (*types.EmbeddedClusterNodes, error)
- func IsEmbeddedCluster(clientset kubernetes.Interface) (bool, error)
- func IsHA(clientset kubernetes.Interface) (bool, error)
- func ReadConfigMap(client kubernetes.Interface) (*corev1.ConfigMap, error)
- func SyncExec(coreClient corev1client.CoreV1Interface, clientConfig *rest.Config, ...) (int, string, string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeleteNode ¶
func GenerateAddNodeCommand ¶
func GenerateAddNodeCommand(ctx context.Context, client kubernetes.Interface, token string) (string, error)
GenerateAddNodeCommand returns the command a user should run to add a node with the provided token the command will be of the form 'embeddedcluster node join ip:port UUID'
func GenerateAddNodeToken ¶
func GenerateAddNodeToken(ctx context.Context, client kubernetes.Interface, nodeRole string) (string, error)
GenerateAddNodeToken will generate the embedded cluster node add command for a node with the specified roles join commands will last for 24 hours, and will be cached for 1 hour after first generation
func GenerateK0sJoinCommand ¶
func GenerateK0sJoinCommand(ctx context.Context, client kubernetes.Interface, roles []string) (string, error)
GenerateK0sJoinCommand returns the k0s node join command, without the token but with all other required flags (including node labels generated from the roles etc)
func GetNode ¶
func GetNode(ctx context.Context, client kubernetes.Interface, nodeName string) (*types.Node, error)
GetNode will get a node with stats and podlist
func GetNodes ¶
func GetNodes(ctx context.Context, client kubernetes.Interface) (*types.EmbeddedClusterNodes, error)
GetNodes will get a list of nodes with stats
func IsEmbeddedCluster ¶
func IsEmbeddedCluster(clientset kubernetes.Interface) (bool, error)
func ReadConfigMap ¶
func ReadConfigMap(client kubernetes.Interface) (*corev1.ConfigMap, error)
ReadConfigMap will read the Kurl config from a configmap
Types ¶
This section is empty.