Documentation ¶
Index ¶
- func MakeContainer(name string, tweaks ...TweakContainer) api.Container
- func MakeEmptyVolume(name string) api.Volume
- func MakePod(name string, tweaks ...Tweak) *api.Pod
- func MakePodSpec(tweaks ...Tweak) api.PodSpec
- func MakeResourceRequirements(requests, limits map[string]string) api.ResourceRequirements
- type Tweak
- func SetActiveDeadlineSeconds(deadline int64) Tweak
- func SetAffinity(affinity *api.Affinity) Tweak
- func SetAnnotations(annos map[string]string) Tweak
- func SetContainers(containers ...api.Container) Tweak
- func SetDNSPolicy(policy api.DNSPolicy) Tweak
- func SetEphemeralContainers(containers ...api.EphemeralContainer) Tweak
- func SetHostAliases(hostAliases ...api.HostAlias) Tweak
- func SetInitContainers(containers ...api.Container) Tweak
- func SetLabels(annos map[string]string) Tweak
- func SetNamespace(ns string) Tweak
- func SetNodeName(name string) Tweak
- func SetNodeSelector(nodeSelector map[string]string) Tweak
- func SetOS(name api.OSName) Tweak
- func SetObjectMeta(objectMeta metav1.ObjectMeta) Tweak
- func SetOverhead(overhead api.ResourceList) Tweak
- func SetPriorityClassName(name string) Tweak
- func SetResourceClaims(claims ...api.PodResourceClaim) Tweak
- func SetResourceVersion(rv string) Tweak
- func SetRestartPolicy(policy api.RestartPolicy) Tweak
- func SetRuntimeClassName(name string) Tweak
- func SetSchedulingGates(gates ...api.PodSchedulingGate) Tweak
- func SetSecurityContext(ctx *api.PodSecurityContext) Tweak
- func SetServiceAccountName(name string) Tweak
- func SetStatus(status api.PodStatus) Tweak
- func SetTerminationGracePeriodSeconds(grace int64) Tweak
- func SetTolerations(tolerations ...api.Toleration) Tweak
- func SetTopologySpreadConstraints(tsc ...api.TopologySpreadConstraint) Tweak
- func SetVolumes(volumes ...api.Volume) Tweak
- type TweakContainer
- func SetContainerImage(image string) TweakContainer
- func SetContainerPorts(ports ...api.ContainerPort) TweakContainer
- func SetContainerResizePolicy(policies ...api.ContainerResizePolicy) TweakContainer
- func SetContainerResources(rr api.ResourceRequirements) TweakContainer
- func SetContainerRestartPolicy(policy api.ContainerRestartPolicy) TweakContainer
- func SetContainerSecurityContext(ctx api.SecurityContext) TweakContainer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MakeContainer ¶
func MakeContainer(name string, tweaks ...TweakContainer) api.Container
func MakeEmptyVolume ¶
func MakePod ¶
MakePod helps construct Pod objects (which pass API validation) more legibly and tersely than a Go struct definition. By default this produces a Pod with a single container, ctr. The caller can pass any number of tweak functions to further modify the result.
func MakePodSpec ¶
func MakeResourceRequirements ¶
func MakeResourceRequirements(requests, limits map[string]string) api.ResourceRequirements
Types ¶
type Tweak ¶
Tweak is a function that modifies a Pod.
func SetAffinity ¶
func SetAnnotations ¶
func SetContainers ¶
func SetDNSPolicy ¶
func SetEphemeralContainers ¶
func SetEphemeralContainers(containers ...api.EphemeralContainer) Tweak
func SetHostAliases ¶
func SetInitContainers ¶
func SetNamespace ¶
func SetNodeName ¶
func SetNodeSelector ¶
func SetObjectMeta ¶
func SetObjectMeta(objectMeta metav1.ObjectMeta) Tweak
func SetOverhead ¶
func SetOverhead(overhead api.ResourceList) Tweak
func SetPriorityClassName ¶
func SetResourceClaims ¶
func SetResourceClaims(claims ...api.PodResourceClaim) Tweak
func SetResourceVersion ¶
func SetRestartPolicy ¶
func SetRestartPolicy(policy api.RestartPolicy) Tweak
func SetRuntimeClassName ¶
func SetSchedulingGates ¶
func SetSchedulingGates(gates ...api.PodSchedulingGate) Tweak
func SetSecurityContext ¶
func SetSecurityContext(ctx *api.PodSecurityContext) Tweak
func SetServiceAccountName ¶
func SetTolerations ¶
func SetTolerations(tolerations ...api.Toleration) Tweak
func SetTopologySpreadConstraints ¶
func SetTopologySpreadConstraints(tsc ...api.TopologySpreadConstraint) Tweak
func SetVolumes ¶
type TweakContainer ¶
func SetContainerImage ¶
func SetContainerImage(image string) TweakContainer
func SetContainerPorts ¶
func SetContainerPorts(ports ...api.ContainerPort) TweakContainer
func SetContainerResizePolicy ¶
func SetContainerResizePolicy(policies ...api.ContainerResizePolicy) TweakContainer
func SetContainerResources ¶
func SetContainerResources(rr api.ResourceRequirements) TweakContainer
func SetContainerRestartPolicy ¶
func SetContainerRestartPolicy(policy api.ContainerRestartPolicy) TweakContainer
func SetContainerSecurityContext ¶
func SetContainerSecurityContext(ctx api.SecurityContext) TweakContainer
Click to show internal directories.
Click to hide internal directories.