Documentation ¶
Index ¶
- func CreateFakeContainer(containerName string) corev1.Container
- func FakeResourceRequirements(cpu, memory string) (corev1.ResourceRequirements, error)
- func GenerateDummyContainerComponent(name string, volMounts []v1.VolumeMount, endpoints []v1.Endpoint, ...) v1.Component
- func GetDockerImageTestComponent(div DockerImageValues, autobuild *bool, attr attributes.Attributes) v1.Component
- func GetDockerImageTestComponentParentOverride(div DockerImageValues) v1.ComponentParentOverride
- func GetDockerImageTestComponentPluginOverride(div DockerImageValues) v1.ComponentPluginOverride
- func GetFakeContainerComponent(name string) v1.Component
- func GetFakeEnv(name, value string) v1.EnvVar
- func GetFakeEnvParentOverride(name, value string) v1.EnvVarParentOverride
- func GetFakeExecRunCommands() []v1.ExecCommand
- func GetFakeVolumeComponent(name, size string) v1.Component
- func GetFakeVolumeMount(name, path string) v1.VolumeMount
- func GetFakeVolumeMountParentOverride(name, path string) v1.VolumeMountParentOverride
- type DockerImageValues
- type FakeK8sClient
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateFakeContainer ¶
CreateFakeContainer creates a container with the given containerName
func FakeResourceRequirements ¶
func FakeResourceRequirements(cpu, memory string) (corev1.ResourceRequirements, error)
FakeResourceRequirements creates a fake resource requirements from cpu and memory
func GenerateDummyContainerComponent ¶ added in v1.3.0
func GenerateDummyContainerComponent(name string, volMounts []v1.VolumeMount, endpoints []v1.Endpoint, envs []v1.EnvVar, annotation v1.Annotation, dedicatedPod *bool) v1.Component
GenerateDummyContainerComponent returns a dummy container component for testing
func GetDockerImageTestComponent ¶ added in v1.3.0
func GetDockerImageTestComponent(div DockerImageValues, autobuild *bool, attr attributes.Attributes) v1.Component
GetDockerImageTestComponent returns a docker image component that is used for testing. The parameters allow customization of the content. If they are set to nil, then the properties will not be set
func GetDockerImageTestComponentParentOverride ¶ added in v1.3.0
func GetDockerImageTestComponentParentOverride(div DockerImageValues) v1.ComponentParentOverride
GetDockerImageTestComponentParentOverride returns a docker image parent override component that is used for testing. The parameters allow customization of the content. If they are set to nil, then the properties will not be set
func GetDockerImageTestComponentPluginOverride ¶ added in v1.3.0
func GetDockerImageTestComponentPluginOverride(div DockerImageValues) v1.ComponentPluginOverride
GetDockerImageTestComponentPluginOverride returns a docker image parent override component that is used for testing. The parameters allow customization of the content. If they are set to nil, then the properties will not be set
func GetFakeContainerComponent ¶
GetFakeContainerComponent returns a fake container component for testing. Deprecated: use GenerateDummyContainerComponent instead
func GetFakeEnv ¶
GetFakeEnv returns a fake env for testing
func GetFakeEnvParentOverride ¶
func GetFakeEnvParentOverride(name, value string) v1.EnvVarParentOverride
GetFakeEnvParentOverride returns a fake envParentOverride for testing
func GetFakeExecRunCommands ¶
func GetFakeExecRunCommands() []v1.ExecCommand
GetFakeExecRunCommands returns fake commands for testing
func GetFakeVolumeComponent ¶
GetFakeVolumeComponent returns a fake volume component for testing
func GetFakeVolumeMount ¶
func GetFakeVolumeMount(name, path string) v1.VolumeMount
GetFakeVolumeMount returns a fake volume mount for testing
func GetFakeVolumeMountParentOverride ¶
func GetFakeVolumeMountParentOverride(name, path string) v1.VolumeMountParentOverride
GetFakeVolumeMountParentOverride returns a fake volumeMountParentOverride for testing
Types ¶
type DockerImageValues ¶ added in v1.3.0
type DockerImageValues struct { //maps to Image.ImageName ImageName string //maps to Image.Dockerfile.DockerfileSrc.Uri Uri string //maps to Image.Dockerfile.BuildContext BuildContext string //maps to Image.Dockerfile.RootRequired RootRequired *bool }
DockerImageValues struct can be used to set override or main component struct values