kube

package
v0.0.0-...-eab9307 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetClient

func GetClient(cfg *rest.Config) client.Client

Get K8s client.

func GetClientSet

func GetClientSet() *kubernetes.Clientset

Get K8s clientset.

Types

type K8sClient

type K8sClient struct {
	K8s client.Client
}

func NewK8sClient

func NewK8sClient() *K8sClient

func (*K8sClient) CreateNamespace

func (c *K8sClient) CreateNamespace(namespaceName string) error

Creates a Namespace

func (*K8sClient) CreateNamespaces

func (c *K8sClient) CreateNamespaces(namespaceNames []string) error

Creates a namespace if it does not exist

func (*K8sClient) GetClusterNamespace

func (c *K8sClient) GetClusterNamespace(namespaceName string) (*corev1.Namespace, error)

Retrieve corev1.Namespace from cluster

func (*K8sClient) ListClusterNameSpaces

func (c *K8sClient) ListClusterNameSpaces() (*corev1.NamespaceList, error)

List namespaces currently in cluster. Exit if we can't.

func (*K8sClient) UpdateNamespace

func (c *K8sClient) UpdateNamespace(namespace *corev1.Namespace) error

Modify the Metadata of the specified Namespace

Jump to

Keyboard shortcuts

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