k8s

package
v0.14.2 Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2022 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(k8sConfigPath string, k8sClientQPS, k8sClientBurst, k8sClientTimeout int) error

Types

type K8sClient

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

func (*K8sClient) CreatePersistentVolume

func (c *K8sClient) CreatePersistentVolume(pv *apiv1.PersistentVolume) (*apiv1.PersistentVolume, error)

func (*K8sClient) CreatePersistentVolumeClaim

func (c *K8sClient) CreatePersistentVolumeClaim(namespace string, pvc *apiv1.PersistentVolumeClaim) (*apiv1.
	PersistentVolumeClaim, error)

func (*K8sClient) DeletePersistentVolume

func (c *K8sClient) DeletePersistentVolume(name string, deleteOptions *metav1.DeleteOptions) error

func (*K8sClient) DeletePersistentVolumeClaim

func (c *K8sClient) DeletePersistentVolumeClaim(namespace string, name string,
	deleteOptions *metav1.DeleteOptions) error

func (*K8sClient) GetNamespace

func (c *K8sClient) GetNamespace(namespace string, getOptions metav1.GetOptions) (*apiv1.Namespace, error)

func (*K8sClient) GetPersistentVolume

func (c *K8sClient) GetPersistentVolume(name string, getOptions metav1.GetOptions) (*apiv1.PersistentVolume, error)

func (*K8sClient) GetPersistentVolumeClaim

func (c *K8sClient) GetPersistentVolumeClaim(namespace, name string, getOptions metav1.GetOptions) (*apiv1.
	PersistentVolumeClaim, error)

func (*K8sClient) ListNamespaces

func (c *K8sClient) ListNamespaces(listOptions metav1.ListOptions) (*apiv1.NamespaceList, error)

type K8sOperator

type K8sOperator interface {
	CreatePersistentVolume(pv *apiv1.PersistentVolume) (*apiv1.PersistentVolume, error)
	DeletePersistentVolume(name string, deleteOptions *metav1.DeleteOptions) error
	GetPersistentVolume(name string, getOptions metav1.GetOptions) (*apiv1.PersistentVolume, error)
	CreatePersistentVolumeClaim(namespace string, pvc *apiv1.PersistentVolumeClaim) (*apiv1.PersistentVolumeClaim, error)
	DeletePersistentVolumeClaim(namespace string, name string, deleteOptions *metav1.DeleteOptions) error
	GetPersistentVolumeClaim(namespace string, name string, getOptions metav1.GetOptions) (*apiv1.PersistentVolumeClaim, error)
	GetNamespace(namespace string, getOptions metav1.GetOptions) (*apiv1.Namespace, error)
	ListNamespaces(listOptions metav1.ListOptions) (*apiv1.NamespaceList, error)
}

func GetK8sOperator

func GetK8sOperator() K8sOperator

Jump to

Keyboard shortcuts

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