factories

package
v0.0.0-...-83b13a5 Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2020 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConfigMap

func ConfigMap(seed ...*corev1.ConfigMap) *configMap

func Deployment

func Deployment(seed ...*appsv1.Deployment) *deployment

func Ingress

func Ingress(seed ...*networkingv1beta1.Ingress) *ingress

func Secret

func Secret(seed ...*corev1.Secret) *secret

func Service

func Service(seed ...*corev1.Service) *service

func ServiceAccount

func ServiceAccount(seed ...*corev1.ServiceAccount) *serviceAccount

func TestResource

func TestResource(seed ...*rtesting.TestResource) *testresource

Types

type ConditionFactory

type ConditionFactory interface {
	Create() apis.Condition

	Type(t apis.ConditionType) ConditionFactory
	Unknown() ConditionFactory
	True() ConditionFactory
	False() ConditionFactory
	Reason(reason, message string) ConditionFactory
	Info() ConditionFactory
	Warning() ConditionFactory
	Error() ConditionFactory
}

func Condition

func Condition(seed ...apis.Condition) ConditionFactory

type ObjectMeta

type ObjectMeta interface {
	Create() metav1.ObjectMeta

	Namespace(namespace string) ObjectMeta
	Name(format string, a ...interface{}) ObjectMeta
	GenerateName(format string, a ...interface{}) ObjectMeta
	AddLabel(key, value string) ObjectMeta
	AddAnnotation(key, value string) ObjectMeta
	Generation(generation int64) ObjectMeta
	ControlledBy(owner testing.Factory, scheme *runtime.Scheme) ObjectMeta
	Created(sec int64) ObjectMeta
	Deleted(sec int64) ObjectMeta
	UID(uid string) ObjectMeta
}

func ObjectMetaFactory

func ObjectMetaFactory(seed metav1.ObjectMeta) ObjectMeta

type PodTemplateSpec

type PodTemplateSpec interface {
	Create() corev1.PodTemplateSpec

	AddLabel(key, value string) PodTemplateSpec
	AddAnnotation(key, value string) PodTemplateSpec
	ObjectMeta(func(ObjectMeta)) PodTemplateSpec
	ContainerNamed(name string, cb func(*corev1.Container)) PodTemplateSpec
	Volumes(volumes ...corev1.Volume) PodTemplateSpec
}

func PodTemplateSpecFactory

func PodTemplateSpecFactory(seed corev1.PodTemplateSpec) PodTemplateSpec

Jump to

Keyboard shortcuts

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