kubernetes

package
v2.12.0 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2023 License: AGPL-3.0 Imports: 15 Imported by: 0

Documentation

Overview

Package kubernetes interacts with the Kubernetes API to update an fetch objects related to joining nodes.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client is a kubernetes client.

func New

func New() (*Client, error)

New creates a new kubernetes client.

func (*Client) AddNodeToJoiningNodes

func (c *Client) AddNodeToJoiningNodes(ctx context.Context, nodeName string, componentsReference string, isControlPlane bool) error

AddNodeToJoiningNodes adds the provided node as a joining node CRD.

func (*Client) CreateConfigMap

func (c *Client) CreateConfigMap(ctx context.Context, name string, data map[string]string) error

CreateConfigMap creates a configmap in the kube-system namespace with the provided name and data.

func (*Client) GetComponents

func (c *Client) GetComponents(ctx context.Context, configMapName string) (components.Components, error)

GetComponents returns the components of the cluster.

func (*Client) GetConfigMapData added in v2.12.0

func (c *Client) GetConfigMapData(ctx context.Context, name, key string) (string, error)

GetConfigMapData returns the data for the given key in the configmap with the given name.

func (*Client) GetK8sComponentsRefFromNodeVersionCRD added in v2.4.0

func (c *Client) GetK8sComponentsRefFromNodeVersionCRD(ctx context.Context, nodeName string) (string, error)

GetK8sComponentsRefFromNodeVersionCRD returns the K8sComponentsRef from the node version CRD.

func (*Client) UpdateConfigMap added in v2.12.0

func (c *Client) UpdateConfigMap(ctx context.Context, name, key, value string) error

UpdateConfigMap updates the configmap with the provided name by writing the provided key and value.

Jump to

Keyboard shortcuts

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