k8sutil

package
v7.1.1+incompatible Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2019 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Initialize

func Initialize() error

Initialize creates all necessary clientsets for interacting with various Kubernetes APIs

Types

type CSKubeAPI

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

CSKubeAPI is an object for interacting with the CRDs containership is using to extend kubernetes base api

func CSAPI

func CSAPI() *CSKubeAPI

CSAPI returns the instance of CSKubeAPI

func (CSKubeAPI) Client

func (k CSKubeAPI) Client() *csclientset.Clientset

Client returns the clientset which is what is used for getting the different CRDs that containership has defined

func (CSKubeAPI) Config

func (k CSKubeAPI) Config() *rest.Config

Config returns the configuration that was used for connecting to kubernetes api

func (CSKubeAPI) NewCSSharedInformerFactory

func (k CSKubeAPI) NewCSSharedInformerFactory(t time.Duration) csinformers.SharedInformerFactory

NewCSSharedInformerFactory returns a shared informer factory for listening to and interacting with containership CRDs

type CerebralKubeAPI

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

CerebralKubeAPI is an object for interacting with the CRDs cerebral is using to extend kubernetes base api

func CerebralAPI

func CerebralAPI() *CerebralKubeAPI

CerebralAPI returns the instance of CerebralKubeAPI

func (CerebralKubeAPI) Client

Client returns the clientset which is what is used for getting the different CRDs that containership has defined

func (CerebralKubeAPI) Config

func (k CerebralKubeAPI) Config() *rest.Config

Config returns the configuration that was used for connecting to kubernetes api

func (CerebralKubeAPI) NewCerebralSharedInformerFactory

func (k CerebralKubeAPI) NewCerebralSharedInformerFactory(t time.Duration) cerebralinformers.SharedInformerFactory

NewCerebralSharedInformerFactory returns a shared informer factory for listening to and interacting with containership CRDs

type KubeAPI

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

KubeAPI defines an object to be able to easily talk with kubernetes, and store needed information about how we are talking to kubernetes

func API

func API() *KubeAPI

API returns an instance of the KubeAPI

func (KubeAPI) Client

func (k KubeAPI) Client() *kubernetes.Clientset

Client returns the client set that is used to interact with the objects that kubernetes has defined

func (KubeAPI) Config

func (k KubeAPI) Config() *rest.Config

Config returns the configuration that was used for connecting to kubernetes api

func (KubeAPI) DeleteContainershipServiceAccounts

func (k KubeAPI) DeleteContainershipServiceAccounts(namespace string) error

DeleteContainershipServiceAccounts returns all service accounts with the containership managed label

func (KubeAPI) DeleteNamespace

func (k KubeAPI) DeleteNamespace(name string) error

DeleteNamespace deletes the namespace with the given name

func (KubeAPI) GetContainershipNamespaces

func (k KubeAPI) GetContainershipNamespaces() (*corev1.NamespaceList, error)

GetContainershipNamespaces returns all Containership namespaces

func (KubeAPI) GetNamespaces

func (k KubeAPI) GetNamespaces() (*corev1.NamespaceList, error)

GetNamespaces returns all namespaces from the kubernetes cluster

func (KubeAPI) GetNodes

func (k KubeAPI) GetNodes() (*corev1.NodeList, error)

GetNodes returns all nodes running the kublet in the kubernetes cluster

func (KubeAPI) NewKubeSharedInformerFactory

func (k KubeAPI) NewKubeSharedInformerFactory(t time.Duration) kubeinformers.SharedInformerFactory

NewKubeSharedInformerFactory returns the shared informer factory for watching kubernetes resource events

type KubeExtensionsAPI

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

KubeExtensionsAPI provides access to the apiextensions API group

func ExtensionsAPI

func ExtensionsAPI() *KubeExtensionsAPI

ExtensionsAPI returns the apiextensions API

func (KubeExtensionsAPI) Client

Client returns the apiextensions client

func (KubeExtensionsAPI) DeleteCRD

func (k KubeExtensionsAPI) DeleteCRD(name string) error

DeleteCRD deletes the CRD with the given name

func (KubeExtensionsAPI) GetContainershipCRDs

func (k KubeExtensionsAPI) GetContainershipCRDs() (*v1beta1.CustomResourceDefinitionList, error)

GetContainershipCRDs gets all Containership CRDs

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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