Documentation ¶
Index ¶
- func GetMockControllers(namespace string) []runtime.Object
- func MockContainer(name string) corev1.Container
- func MockController(apiVersion, kind, namespace, name string, spec map[string]interface{}, ...) corev1.Pod
- func MockControllerWithNormalSpec(apiVersion, kind, namespace, name string, dest interface{}) corev1.Pod
- func MockCronJob(namespace, name string) (batchv1.CronJob, corev1.Pod)
- func MockDaemonSet(namespace, name string) (appsv1.DaemonSet, corev1.Pod)
- func MockDeploy(namespace, name string) (appsv1.Deployment, corev1.Pod)
- func MockIngress() networkingv1.Ingress
- func MockJob(namespace, name string) (batchv1.Job, corev1.Pod)
- func MockNakedPod() corev1.Pod
- func MockNamespace(name string) corev1.Namespace
- func MockPod() corev1.Pod
- func MockReplicationController(namespace, name string) (corev1.ReplicationController, corev1.Pod)
- func MockStatefulSet(namespace, name string) (appsv1.StatefulSet, corev1.Pod)
- func SetupTestAPI(objects ...runtime.Object) (kubernetes.Interface, dynamic.Interface)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetMockControllers ¶
GetMockControllers returns mocked controllers for 5 major controller types
func MockContainer ¶
MockContainer creates a container object
func MockController ¶
func MockController(apiVersion, kind, namespace, name string, spec map[string]interface{}, podSpec corev1.PodSpec, dest interface{}) corev1.Pod
MockController creates a mock controller and pod
func MockControllerWithNormalSpec ¶
func MockControllerWithNormalSpec(apiVersion, kind, namespace, name string, dest interface{}) corev1.Pod
MockControllerWithNormalSpec mocks a controller with podspec at spec.template.spec
func MockCronJob ¶
MockCronJob creates a CronJob object.
func MockDaemonSet ¶
MockDaemonSet creates a DaemonSet object.
func MockDeploy ¶
func MockDeploy(namespace, name string) (appsv1.Deployment, corev1.Pod)
MockDeploy creates a Deployment object.
func MockNamespace ¶
MockNamespace returns a namespace object.
func MockReplicationController ¶
func MockReplicationController(namespace, name string) (corev1.ReplicationController, corev1.Pod)
MockReplicationController creates a ReplicationController object.
func MockStatefulSet ¶
func MockStatefulSet(namespace, name string) (appsv1.StatefulSet, corev1.Pod)
MockStatefulSet creates a StatefulSet object.
func SetupTestAPI ¶
SetupTestAPI creates a test kube API struct.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.