kubernetesclient

package
v0.3.6 Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2023 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ClusterGroupResrource = schema.GroupVersionResource{
		Group:    clustercrd.GroupVersion.Group,
		Version:  clustercrd.GroupVersion.Version,
		Resource: "clusters",
	}
)

Functions

This section is empty.

Types

type K8SClient

type K8SClient struct {
	kubernetes.Clientset
	Dynamic dynamic.Interface
}

func NewK8SClient

func NewK8SClient(kubeconfig string) (*K8SClient, error)

func (*K8SClient) GetCluster

func (k *K8SClient) GetCluster(ctx context.Context, name, namespace string) (*clustercrd.Cluster, error)

func (*K8SClient) GetSecret

func (k *K8SClient) GetSecret(ctx context.Context, name, namespace string) (*v1.Secret, error)

func (*K8SClient) GetServiceAccount

func (k *K8SClient) GetServiceAccount(ctx context.Context, name, namespace string) (*v1.ServiceAccount, error)

func (*K8SClient) ListStatefulSets

func (k *K8SClient) ListStatefulSets(ctx context.Context, namespace string, opts metav1.ListOptions) (*appsv1.StatefulSetList, error)

func (*K8SClient) UpdateCluster

func (k *K8SClient) UpdateCluster(ctx context.Context, cluster *clustercrd.Cluster) error

func (*K8SClient) UpdateStatusCluster

func (k *K8SClient) UpdateStatusCluster(ctx context.Context, cluster *clustercrd.Cluster) error

Jump to

Keyboard shortcuts

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