kube

package
v1.0.0-beta.5 Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2019 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultNamespace = "addon-operator"
)

Variables

View Source
var (
	Kubernetes             kubernetes.Interface
	AddonOperatorNamespace string
	AddonOperatorPod       string
)

Functions

func GetCurrentPod

func GetCurrentPod() (pod *v1.Pod, err error)

func GetCurrentPodSpec

func GetCurrentPodSpec() (podSpec v1.PodSpec, err error)

func InitKube

func InitKube() error

InitKube initialize a Kubernetes client config. This method calls shell-operator kube client method that can work in-cluster, out-of-cluster or in-cluster with out-of-cluster kube config

Types

type MockConfigMaps

type MockConfigMaps struct {
	corev1.ConfigMapInterface
	// contains filtered or unexported fields
}

ConfigMaps layer

func (MockConfigMaps) Create

func (configMaps MockConfigMaps) Create(obj *v1.ConfigMap) (*v1.ConfigMap, error)

func (MockConfigMaps) Get

func (configMaps MockConfigMaps) Get(name string, options metav1.GetOptions) (*v1.ConfigMap, error)

func (MockConfigMaps) List

func (configMaps MockConfigMaps) List(options metav1.ListOptions) (*v1.ConfigMapList, error)

func (MockConfigMaps) Update

func (configMaps MockConfigMaps) Update(obj *v1.ConfigMap) (*v1.ConfigMap, error)

type MockCoreV1

type MockCoreV1 struct {
	corev1.CoreV1Interface
	// contains filtered or unexported fields
}

func (MockCoreV1) ConfigMaps

func (mockCoreV1 MockCoreV1) ConfigMaps(namespace string) corev1.ConfigMapInterface

type MockKubernetesClientset

type MockKubernetesClientset struct {
	kubernetes.Interface
	ConfigMapList *v1.ConfigMapList
}

MockKubernetesClientset has ConfigMapList field where all ConfigMaps are stored.

Each underlying layer of API structs have a pointer to MockKubernetesClientset to access to ConfigMapList items.

func NewMockKubernetesClientset

func NewMockKubernetesClientset() *MockKubernetesClientset

func (*MockKubernetesClientset) CoreV1

Core layer of API

Jump to

Keyboard shortcuts

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