EnvVar represents an environment variable present in a Container.
fromFieldPath(name='', fieldPath='')
fromSecretRef(name='', secretRefName='', secretRefKey='')
new(name='', value='')
withName(name)
Name of the environment variable. Must be a C_IDENTIFIER.
withValue(value)
Variable references $(VAR_NAME) are expanded using the previous defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to “”.
Source for the environment variable's value. Cannot be used if value is not empty.
mixinInstance(valueFrom)
Selects a key of a ConfigMap.
mixinInstance(configMapKeyRef)
withKey(key)
The key to select.
withName(name)
Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
withOptional(optional)
Specify whether the ConfigMap or its key must be defined
Selects a field of the pod: supports metadata.name, metadata.namespace, metadata.labels, metadata.annotations, spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP.
mixinInstance(fieldRef)
withFieldPath(fieldPath)
Path of the field to select in the specified API version.
Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported.
mixinInstance(resourceFieldRef)
withContainerName(containerName)
Container name: required for volumes, optional for env vars
withResource(resource)
Required: resource to select
Specifies the output format of the exposed resources, defaults to "1"
mixinInstance(divisor)
Selects a key of a secret in the pod's namespace
mixinInstance(secretKeyRef)
withKey(key)
The key of the secret to select from. Must be a valid secret key.
withName(name)
Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
withOptional(optional)
Specify whether the Secret or its key must be defined