k8s

package
v0.0.0-...-32702a7 Latest Latest
Warning

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

Go to latest
Published: May 29, 2023 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CRDInterface

type CRDInterface interface {
	Create(ctx context.Context, gvk schema.GroupVersionResource, data map[string]interface{}) (*unstructured.Unstructured, error)
	Delete(ctx context.Context, gvk schema.GroupVersionResource, namespace, name string) error
	Get(ctx context.Context, gvk schema.GroupVersionResource, namespace, name string) (*unstructured.Unstructured, error)
	Update(ctx context.Context, gvk schema.GroupVersionResource, namespace, name string, data map[string]interface{}) (*unstructured.Unstructured, error)
}

func NewCRDOperation

func NewCRDOperation(dyn dynamic.Interface) CRDInterface

type CRDOperation

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

func (*CRDOperation) Create

func (o *CRDOperation) Create(ctx context.Context, gvk schema.GroupVersionResource, data map[string]interface{}) (*unstructured.Unstructured, error)

func (*CRDOperation) Delete

func (o *CRDOperation) Delete(ctx context.Context, gvk schema.GroupVersionResource, namespace, name string) error

func (*CRDOperation) Get

func (*CRDOperation) Update

func (o *CRDOperation) Update(ctx context.Context, gvk schema.GroupVersionResource, namespace, name string, data map[string]interface{}) (*unstructured.Unstructured, error)

type ClientManager

type ClientManager struct {
	K8sClient  *kubernetes.Clientset
	Gaiaclient *gaiaclientset.Clientset
	RestConfig *restclient.Config
}

func GetClient

func GetClient() (*ClientManager, error)

func GetClientWithPanic

func GetClientWithPanic() (*ClientManager, error)

type ConfigmapInterface

type ConfigmapInterface interface {
	Create(ctx context.Context, confMap *v1.ConfigMap) (*v1.ConfigMap, error)
	Delete(ctx context.Context, namespace, name string) error
	Get(ctx context.Context, namespace, name string) (*v1.ConfigMap, error)
	Update(ctx context.Context, namespace, name string, configMap *v1.ConfigMap) (*v1.ConfigMap, error)
}

func NewConfigmapOperation

func NewConfigmapOperation(client *kubernetes.Clientset) ConfigmapInterface

type ConfigmapOperation

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

func (ConfigmapOperation) Create

func (c ConfigmapOperation) Create(ctx context.Context, confMap *v1.ConfigMap) (*v1.ConfigMap, error)

func (ConfigmapOperation) Delete

func (c ConfigmapOperation) Delete(ctx context.Context, namespace, name string) error

func (ConfigmapOperation) Get

func (c ConfigmapOperation) Get(ctx context.Context, namespace, name string) (*v1.ConfigMap, error)

func (ConfigmapOperation) Update

func (c ConfigmapOperation) Update(ctx context.Context, namespace, name string, configMap *v1.ConfigMap) (*v1.ConfigMap, error)

type DeploymentInterface

type DeploymentInterface interface {
	Get(ctx context.Context, namespace, name string) (*appsv1.Deployment, error)
	Create(ctx context.Context, deployment *appsv1.Deployment) (*appsv1.Deployment, error)
	Update(ctx context.Context, namespace, name string, deployment *appsv1.Deployment) (*appsv1.Deployment, error)
}

func NewDeploymentOperation

func NewDeploymentOperation(client *kubernetes.Clientset) DeploymentInterface

type DeploymentOperation

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

func (DeploymentOperation) Create

func (o DeploymentOperation) Create(ctx context.Context, deployment *appsv1.Deployment) (*appsv1.Deployment, error)

func (DeploymentOperation) Get

func (o DeploymentOperation) Get(ctx context.Context, namespace, name string) (*appsv1.Deployment, error)

func (DeploymentOperation) Update

func (o DeploymentOperation) Update(ctx context.Context, namespace, name string, deployment *appsv1.Deployment) (*appsv1.Deployment, error)

type PodFormatStatus

type PodFormatStatus struct {
	Ready  string `json:"ready"`
	Reason string `json:"reason"`
}

func GetFormatStatus

func GetFormatStatus(pod *corev1.Pod) (*PodFormatStatus, error)

Jump to

Keyboard shortcuts

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