kube

package
v0.0.0-...-6c8c038 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2020 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type KubeClientSet

type KubeClientSet struct {
	Client *kubernetes.Clientset
	Config *rest.Config
	Ctx    context.Context
}

custom definition for client to add customize methods for fetching resource clients

func CreateClient

func CreateClient(ctx context.Context, cluster string) *KubeClientSet

creating a kubernetes client object with the provided cluster name it will return a wrapper for client and config which can be used to get other resource clients like deployments, namespace etc

func (*KubeClientSet) CreateCM

func (c *KubeClientSet) CreateCM(ns string, name string, cm *v12.ConfigMap, opts v1.CreateOptions) (*v12.ConfigMap, error)

func (*KubeClientSet) CreateDeployment

func (c *KubeClientSet) CreateDeployment(ns string, body *v12.Deployment, opts v1.CreateOptions) (*v12.Deployment, error)

CreateDeployment creates a deployment and returns response or error if not created

func (*KubeClientSet) CreateHpa

func (*KubeClientSet) CreateNamespace

func (c *KubeClientSet) CreateNamespace(ns *v12.Namespace, opts v1.CreateOptions) (*v12.Namespace, error)

func (*KubeClientSet) CreatePvc

func (*KubeClientSet) CreateService

func (c *KubeClientSet) CreateService(ns string, svc *v12.Service, opts v1.CreateOptions) (*v12.Service, error)

func (*KubeClientSet) CreateStatefulSet

func (c *KubeClientSet) CreateStatefulSet(ns string, body *v12.StatefulSet, createOptions v1.CreateOptions) (*v12.StatefulSet, error)

CreateStatefulSet creates a namespace and returns response or error if not created

func (*KubeClientSet) DeleteNamespace

func (c *KubeClientSet) DeleteNamespace(ns string, opts v1.DeleteOptions) error

func (*KubeClientSet) DeletePvc

func (c *KubeClientSet) DeletePvc(ns string, svc string, delOptions v1.DeleteOptions) error

func (*KubeClientSet) DeleteService

func (c *KubeClientSet) DeleteService(ns string, svc string, delOptions v1.DeleteOptions) error

func (*KubeClientSet) DeleteStatefulSets

func (c *KubeClientSet) DeleteStatefulSets(ns string, statefulsets string, deleteOptions v1.DeleteOptions) error

DeleteStatefulSets deletes a resource or returns an error if not found

func (*KubeClientSet) GetCM

func (c *KubeClientSet) GetCM(ns string, name string, opts v1.GetOptions) (*v12.ConfigMap, error)

func (*KubeClientSet) GetCMClient

func (c *KubeClientSet) GetCMClient(namespace string) v12.ConfigMapInterface

GetCMClient returns a config map client

func (*KubeClientSet) GetDeployment

func (c *KubeClientSet) GetDeployment(ns string, deploy string, opts v1.GetOptions) (*v12.Deployment, error)

GetDeployment returns a deployment from the given namespace or returns an error

func (*KubeClientSet) GetDeploymentClient

func (c *KubeClientSet) GetDeploymentClient(namespace string) v1.DeploymentInterface

GetDeploymentClient returns a deployment client interface generated from KubeClientSet config

func (*KubeClientSet) GetHPAClient

func (c *KubeClientSet) GetHPAClient(namespace string) v2beta2.HorizontalPodAutoscalerInterface

GetHPAClient returns a config map client

func (*KubeClientSet) GetHpa

func (*KubeClientSet) GetNamespace

func (c *KubeClientSet) GetNamespace(ns string) (*v12.Namespace, error)

func (*KubeClientSet) GetNamespaceClient

func (c *KubeClientSet) GetNamespaceClient() v12.NamespaceInterface

GetNamespaceClient returns a namespace client interface generated from KubeClientSet config

func (*KubeClientSet) GetPVCClient

func (c *KubeClientSet) GetPVCClient(namespace string) v12.PersistentVolumeClaimInterface

GetPVCClient returns a pvc interface generated from KubeClientSet config

func (*KubeClientSet) GetPvc

func (c *KubeClientSet) GetPvc(ns string, svc string) (*v12.PersistentVolumeClaim, error)

func (*KubeClientSet) GetSVCClient

func (c *KubeClientSet) GetSVCClient(namespace string) v12.ServiceInterface

GetSVCClient returns a service interface generated from KubeClientSet config

func (*KubeClientSet) GetService

func (c *KubeClientSet) GetService(ns string, svc string) (*v12.Service, error)

func (*KubeClientSet) GetStatefulSet

func (c *KubeClientSet) GetStatefulSet(ns string, statefulset string, getOptions v1.GetOptions) (*v12.StatefulSet, error)

GetStatefulSet returns a stateful from the given namespace or returns an error

func (*KubeClientSet) GetStatefulSetClient

func (c *KubeClientSet) GetStatefulSetClient(namespace string) v1.StatefulSetInterface

GetStatefulSetClient returns a statefulset interface generated from KubeClientSet config

func (*KubeClientSet) ListCM

func (c *KubeClientSet) ListCM(ns string, opts v1.ListOptions) (*v12.ConfigMapList, error)

func (*KubeClientSet) ListDeployment

func (c *KubeClientSet) ListDeployment(ns string, deploy string, opts v1.ListOptions) (*v12.DeploymentList, error)

GetDeployment returns a deployment from the given namespace or returns an error

func (*KubeClientSet) ListHpa

func (*KubeClientSet) ListStatefulSet

func (c *KubeClientSet) ListStatefulSet(ns string, opts v1.ListOptions) (*v12.StatefulSetList, error)

ListStatefulSet returns a statefulset from the given namespace or returns an error

func (*KubeClientSet) NamespaceList

func (c *KubeClientSet) NamespaceList(opts v1.ListOptions) (*v12.NamespaceList, error)

func (*KubeClientSet) PatchCM

func (c *KubeClientSet) PatchCM(namespace string, name string, patchType types.PatchType, data []byte, opts v1.PatchOptions, subresources string) (*v12.ConfigMap, error)

func (*KubeClientSet) PatchDeployment

func (c *KubeClientSet) PatchDeployment(ns string, deployment string, patchType types.PatchType, data []byte, patchOptions v1.PatchOptions, subresource string) (*v12.Deployment, error)

func (*KubeClientSet) PatchStatefulSets

func (c *KubeClientSet) PatchStatefulSets(ns string, statefulsets string, patchType types.PatchType, data []byte, patchOptions v1.PatchOptions, subresource string) (*v12.StatefulSet, error)

PatchStatefulSets update the resource partially and returns and error if not successful

func (*KubeClientSet) RestartDeployment

func (c *KubeClientSet) RestartDeployment(ns string, deployment string) error

func (*KubeClientSet) RestartStatefulSets

func (c *KubeClientSet) RestartStatefulSets(ns string, ss string) error

RestartStatefulSets restarts the resource by setting annotations to latest date

func (*KubeClientSet) UpdateCM

func (c *KubeClientSet) UpdateCM(namespace string, cm *v12.ConfigMap, options v1.UpdateOptions) (*v12.ConfigMap, error)

func (*KubeClientSet) WatchPvc

func (c *KubeClientSet) WatchPvc(ns string, listOpts v1.ListOptions) (watch.Interface, error)

func (*KubeClientSet) WatchService

func (c *KubeClientSet) WatchService(ns string, listOpts v1.ListOptions) (watch.Interface, error)

func (*KubeClientSet) WatchStatefulSets

func (c *KubeClientSet) WatchStatefulSets(ns string) (watch.Interface, error)

WatchStatefulSets provides the watch for statefulset event changes

Jump to

Keyboard shortcuts

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