Documentation ¶
Index ¶
- func InjectEnvIntoDeployment(podSpec *corev1.PodSpec, envVars []corev1.EnvVar) error
- func InjectNodeSelectorIntoDeployment(podSpec *corev1.PodSpec, nodeSelector map[string]string) error
- func InjectResourcesIntoDeployment(podSpec *corev1.PodSpec, resources *corev1.ResourceRequirements) error
- func InjectTolerationsIntoDeployment(podSpec *corev1.PodSpec, tolerations []corev1.Toleration) error
- func InjectVolumeMountsIntoDeployment(podSpec *corev1.PodSpec, volumeMounts []corev1.VolumeMount) error
- func InjectVolumesIntoDeployment(podSpec *corev1.PodSpec, volumes []corev1.Volume) error
- func OverrideDeploymentAffinity(podSpec *corev1.PodSpec, affinity *corev1.Affinity) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InjectEnvIntoDeployment ¶
InjectEnvIntoDeployment injects the proxy env variables specified in proxyEnvVar into the container(s) of the given PodSpec.
If any Container in PodSpec already defines an env variable of the same name as any of the proxy env variables then it
func InjectNodeSelectorIntoDeployment ¶
func InjectNodeSelectorIntoDeployment(podSpec *corev1.PodSpec, nodeSelector map[string]string) error
InjectNodeSelectorIntoDeployment injects the provided NodeSelector into the container(s) of the given PodSpec.
If any Container in PodSpec already defines a NodeSelector it will be overwritten.
func InjectResourcesIntoDeployment ¶
func InjectResourcesIntoDeployment(podSpec *corev1.PodSpec, resources *corev1.ResourceRequirements) error
InjectResourcesIntoDeployment will inject provided Resources into given podSpec
If podSpec already defines Resources, it will be overwritten
func InjectTolerationsIntoDeployment ¶
func InjectTolerationsIntoDeployment(podSpec *corev1.PodSpec, tolerations []corev1.Toleration) error
InjectTolerationsIntoDeployment injects provided Tolerations into the given Pod Spec
Tolerations will be appended to the existing once if it does not already exist
func InjectVolumeMountsIntoDeployment ¶
func InjectVolumeMountsIntoDeployment(podSpec *corev1.PodSpec, volumeMounts []corev1.VolumeMount) error
InjectVolumeMountsIntoDeployment injects the provided VolumeMounts into the given PodSpec.
If the PodSpec already defines a VolumeMount of the same name as any of the provided VolumeMounts then it will be overwritten.
func InjectVolumesIntoDeployment ¶
InjectVolumesIntoDeployment injects the provided Volumes into the container(s) of the given PodSpec.
If any Container in PodSpec already defines a Volume of the same name as any of the provided Volumes then it will be overwritten.
func OverrideDeploymentAffinity ¶ added in v0.22.0
OverrideDeploymentAffinity will override the corev1.Affinity defined in the Deployment with the given corev1.Affinity. Any nil top-level sub-attributes (e.g. NodeAffinity, PodAffinity, and PodAntiAffinity) will be ignored. Hint: to overwrite those top-level attributes, empty them out. I.e. use the empty/default object ({}) e.g. NodeAffinity{}. In yaml: affinity:
nodeAffinity: {} podAffinity: {} podAntiAffinity: {}
will completely remove the deployment podSpec.affinity and is equivalent to affinity: {}
Types ¶
This section is empty.