k8sclient

package
v0.17.5 Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2023 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type K8sClient

type K8sClient struct {
	kubernetes.Interface
}

func NewClient

func NewClient() (*K8sClient, error)

func (*K8sClient) CreateJob

func (k *K8sClient) CreateJob(ctx context.Context, job *batchv1.Job) (*batchv1.Job, error)

func (*K8sClient) CreatePod

func (k *K8sClient) CreatePod(ctx context.Context, pod *corev1.Pod) (*corev1.Pod, error)

func (*K8sClient) CreateSecret

func (k *K8sClient) CreateSecret(ctx context.Context, secret *corev1.Secret) (*corev1.Secret, error)

func (*K8sClient) DeleteJob

func (k *K8sClient) DeleteJob(ctx context.Context, jobName string, namespace string) error

func (*K8sClient) DeletePod

func (k *K8sClient) DeletePod(ctx context.Context, pod *corev1.Pod) error

func (*K8sClient) DeleteSecret

func (k *K8sClient) DeleteSecret(ctx context.Context, secretName string, namespace string) error

func (*K8sClient) GetJob

func (k *K8sClient) GetJob(ctx context.Context, jobName, namespace string) (*batchv1.Job, error)

func (*K8sClient) GetPersistentVolume

func (k *K8sClient) GetPersistentVolume(ctx context.Context, pvName string) (*corev1.PersistentVolume, error)

func (*K8sClient) GetPod

func (k *K8sClient) GetPod(ctx context.Context, podName, namespace string) (*corev1.Pod, error)

func (*K8sClient) GetPodLog

func (k *K8sClient) GetPodLog(ctx context.Context, podName, namespace, containerName string) (string, error)

func (*K8sClient) GetSecret

func (k *K8sClient) GetSecret(ctx context.Context, secretName, namespace string) (*corev1.Secret, error)

func (*K8sClient) ListPod

func (k *K8sClient) ListPod(ctx context.Context, namespace string, labelSelector *metav1.LabelSelector, filedSelector *fields.Set) ([]corev1.Pod, error)

func (*K8sClient) PatchPod

func (k *K8sClient) PatchPod(ctx context.Context, pod *corev1.Pod, data []byte, pt types.PatchType) error

func (*K8sClient) UpdateJob

func (k *K8sClient) UpdateJob(ctx context.Context, job *batchv1.Job) error

func (*K8sClient) UpdatePod

func (k *K8sClient) UpdatePod(ctx context.Context, pod *corev1.Pod) error

func (*K8sClient) UpdateSecret

func (k *K8sClient) UpdateSecret(ctx context.Context, secret *corev1.Secret) error

type PatchDelValue added in v0.17.4

type PatchDelValue struct {
	Op   string `json:"op"`
	Path string `json:"path"`
}

type PatchListValue

type PatchListValue struct {
	Op    string   `json:"op"`
	Path  string   `json:"path"`
	Value []string `json:"value"`
}

type PatchMapValue

type PatchMapValue struct {
	Op    string            `json:"op"`
	Path  string            `json:"path"`
	Value map[string]string `json:"value"`
}

type PatchStringValue added in v0.17.4

type PatchStringValue struct {
	Op    string `json:"op"`
	Path  string `json:"path"`
	Value string `json:"value"`
}

Jump to

Keyboard shortcuts

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