k8sutil

package
v0.0.0-...-a606d81 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2020 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 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 hks 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 hks CRDs

type HKSKubeAPI

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

HKSKubeAPI is an object for interacting with the CRDs hks is using to extend kubernetes base api

func HKSAPI

func HKSAPI() *HKSKubeAPI

HKSAPI returns the instance of HKSKubeAPI

func (HKSKubeAPI) Client

func (k HKSKubeAPI) Client() *hksclientset.Clientset

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

func (HKSKubeAPI) Config

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

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

func (HKSKubeAPI) NewHKSSharedInformerFactory

func (k HKSKubeAPI) NewHKSSharedInformerFactory(t time.Duration) hksinformers.SharedInformerFactory

NewHKSSharedInformerFactory returns a shared informer factory for listening to and interacting with hks 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) DeleteHKSServiceAccounts

func (k KubeAPI) DeleteHKSServiceAccounts(namespace string) error

DeleteHKSServiceAccounts returns all service accounts with the hks managed label

func (KubeAPI) DeleteNamespace

func (k KubeAPI) DeleteNamespace(name string) error

DeleteNamespace deletes the namespace with the given name

func (KubeAPI) GetHKSNamespaces

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

GetHKSNamespaces returns all HKS 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) GetHKSCRDs

GetHKSCRDs gets all HKS CRDs

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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