k8s

package
v0.9.0-alpha Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

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 for k8s

func NewK8sClient

func NewK8sClient(client client.Client, logger logr.Logger) *Client

func (*Client) CreateIfNotExistsConfigMap

func (c *Client) CreateIfNotExistsConfigMap(cm *corev1.ConfigMap) error

func (*Client) CreateIfNotExistsDeployment

func (c *Client) CreateIfNotExistsDeployment(deployment *appsv1.Deployment) error

func (*Client) CreateIfNotExistsKVRocks

func (c *Client) CreateIfNotExistsKVRocks(instance *kvrocksv1alpha1.KVRocks) error

func (*Client) CreateIfNotExistsService

func (c *Client) CreateIfNotExistsService(service *corev1.Service) error

func (*Client) CreateIfNotExistsStatefulSet

func (c *Client) CreateIfNotExistsStatefulSet(sts *kruise.StatefulSet) error

func (*Client) CreateOrUpdateConfigMap

func (c *Client) CreateOrUpdateConfigMap(cm *corev1.ConfigMap) error

func (*Client) CreateOrUpdateStatefulSet

func (c *Client) CreateOrUpdateStatefulSet(sts *kruise.StatefulSet) error

func (*Client) CreateStatefulSetOrUpdateImage

func (c *Client) CreateStatefulSetOrUpdateImage(sts *kruise.StatefulSet) error

func (*Client) DeletePVC

func (c *Client) DeletePVC(pvc *corev1.PersistentVolumeClaim) error

func (*Client) DeletePVCByPod

func (c *Client) DeletePVCByPod(podName string, namespace string) error

func (*Client) DeletePodImmediately

func (c *Client) DeletePodImmediately(podName, namespace string) error

func (*Client) DeleteStatefulSetIfExists

func (c *Client) DeleteStatefulSetIfExists(key types.NamespacedName) error

func (*Client) GetConfigMap

func (c *Client) GetConfigMap(key types.NamespacedName) (*corev1.ConfigMap, error)

func (*Client) GetDeployment

func (c *Client) GetDeployment(key types.NamespacedName) (*appsv1.Deployment, error)

func (*Client) GetKVRocks

func (c *Client) GetKVRocks(key types.NamespacedName) (*kvrocksv1alpha1.KVRocks, error)

func (*Client) GetPod

func (c *Client) GetPod(key types.NamespacedName) (*corev1.Pod, error)

func (*Client) GetStatefulSet

func (c *Client) GetStatefulSet(key types.NamespacedName) (*kruise.StatefulSet, error)

func (*Client) ListDeploymentPods

func (c *Client) ListDeploymentPods(key types.NamespacedName) (*corev1.PodList, error)

func (*Client) ListKVRocks

func (c *Client) ListKVRocks(namespace string, labels map[string]string) (*kvrocksv1alpha1.KVRocksList, error)

func (*Client) ListPVC

func (c *Client) ListPVC(namespace string, labels map[string]string) (*corev1.PersistentVolumeClaimList, error)

func (*Client) ListStatefulSetPVC

func (c *Client) ListStatefulSetPVC(key types.NamespacedName) (*corev1.PersistentVolumeClaimList, error)

func (*Client) ListStatefulSetPods

func (c *Client) ListStatefulSetPods(key types.NamespacedName) (*corev1.PodList, error)

func (*Client) ListStatefulSets

func (c *Client) ListStatefulSets(namespace string, labels map[string]string) (*kruise.StatefulSetList, error)

func (*Client) UpdateConfigMap

func (c *Client) UpdateConfigMap(cm *corev1.ConfigMap) error

func (*Client) UpdateDeployment

func (c *Client) UpdateDeployment(deployment *appsv1.Deployment) error

func (*Client) UpdateKVRocks

func (c *Client) UpdateKVRocks(instance *kvrocksv1alpha1.KVRocks) error

func (*Client) UpdatePod

func (c *Client) UpdatePod(pod *corev1.Pod) error

func (*Client) UpdateStatefulSet

func (c *Client) UpdateStatefulSet(sts *kruise.StatefulSet) error

Jump to

Keyboard shortcuts

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