Documentation
¶
Index ¶
- Constants
- Variables
- func GetCurrentPod() (pod *v1.Pod, err error)
- func GetCurrentPodSpec() (podSpec v1.PodSpec, err error)
- func InitKube() error
- type MockConfigMaps
- func (configMaps MockConfigMaps) Create(obj *v1.ConfigMap) (*v1.ConfigMap, error)
- func (configMaps MockConfigMaps) Get(name string, options metav1.GetOptions) (*v1.ConfigMap, error)
- func (configMaps MockConfigMaps) List(options metav1.ListOptions) (*v1.ConfigMapList, error)
- func (configMaps MockConfigMaps) Update(obj *v1.ConfigMap) (*v1.ConfigMap, error)
- type MockCoreV1
- type MockKubernetesClientset
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)
Types ¶
type MockConfigMaps ¶
type MockConfigMaps struct {
corev1.ConfigMapInterface
// contains filtered or unexported fields
}
ConfigMaps layer
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)
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 ¶
func (client *MockKubernetesClientset) CoreV1() corev1.CoreV1Interface
Core layer of API
Click to show internal directories.
Click to hide internal directories.