Documentation
¶
Index ¶
- func New(mods ...Modification) corev1.Container
- type Modification
- func Apply(modifications ...Modification) Modification
- func NOOP() Modification
- func WithCommand(cmd []string) Modification
- func WithEnvs(envs ...corev1.EnvVar) Modification
- func WithImage(image string) Modification
- func WithImagePullPolicy(pullPolicy corev1.PullPolicy) Modification
- func WithLifecycle(lifeCycleMod lifecycle.Modification) Modification
- func WithLivenessProbe(readinessProbeFunc func(*corev1.Probe)) Modification
- func WithName(name string) Modification
- func WithPorts(ports []corev1.ContainerPort) Modification
- func WithReadinessProbe(probeFunc func(*corev1.Probe)) Modification
- func WithResourceRequirements(resources corev1.ResourceRequirements) Modification
- func WithSecurityContext(context corev1.SecurityContext) Modification
- func WithVolumeMounts(volumeMounts []corev1.VolumeMount) Modification
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func New ¶
func New(mods ...Modification) corev1.Container
New returns a concrete corev1.Container instance which has been modified based on the provided modifications
Types ¶
type Modification ¶
func Apply ¶
func Apply(modifications ...Modification) Modification
Apply returns a function which applies a series of Modification functions to a *corev1.Container
func WithCommand ¶
func WithCommand(cmd []string) Modification
WithCommand sets the containers Command
func WithEnvs ¶
func WithEnvs(envs ...corev1.EnvVar) Modification
WithEnvs ensures all of the provided envs exist in the container
func WithImagePullPolicy ¶
func WithImagePullPolicy(pullPolicy corev1.PullPolicy) Modification
WithImagePullPolicy sets the container pullPolicy
func WithLifecycle ¶
func WithLifecycle(lifeCycleMod lifecycle.Modification) Modification
WithLifecycle applies the lifecycle Modification to this container's Lifecycle
func WithLivenessProbe ¶
func WithLivenessProbe(readinessProbeFunc func(*corev1.Probe)) Modification
WithLivenessProbe modifies the container's Liveness Probe
func WithPorts ¶
func WithPorts(ports []corev1.ContainerPort) Modification
WithPorts sets the container's Ports
func WithReadinessProbe ¶
func WithReadinessProbe(probeFunc func(*corev1.Probe)) Modification
WithReadinessProbe modifies the container's Readiness Probe
func WithResourceRequirements ¶
func WithResourceRequirements(resources corev1.ResourceRequirements) Modification
WithResourceRequirements sets the container's Resources
func WithSecurityContext ¶
func WithSecurityContext(context corev1.SecurityContext) Modification
WithSecurityContext sets teh container's SecurityContext
func WithVolumeMounts ¶
func WithVolumeMounts(volumeMounts []corev1.VolumeMount) Modification
WithVolumeMounts sets the VolumeMounts