core.v1.envVar
"EnvVar represents an environment variable present in a Container."
Index
fn new(name, value)
fn fromFieldPath(name, fieldPath)
fn fromSecretRef(name, secretRefName, secretRefKey)
fn withName(name)
fn withValue(value)
obj valueFrom
obj valueFrom.configMapKeyRef
obj valueFrom.fieldRef
obj valueFrom.resourceFieldRef
obj valueFrom.secretKeyRef
Fields
fn new
new(name, value)
new returns a new envVar
of given name
and value
fn fromFieldPath
fromFieldPath(name, fieldPath)
fromFieldPath creates a envVar
from a field path
fn fromSecretRef
fromSecretRef(name, secretRefName, secretRefKey)
fromSecretRef creates a envVar
from a secret reference
fn withName
withName(name)
"Name of the environment variable. Must be a C_IDENTIFIER."
fn withValue
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 \"\"."
obj valueFrom
"EnvVarSource represents a source for the value of an EnvVar."
obj valueFrom.configMapKeyRef
"Selects a key from a ConfigMap."
fn valueFrom.configMapKeyRef.withKey
withKey(key)
"The key to select."
fn valueFrom.configMapKeyRef.withName
withName(name)
"Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names"
fn valueFrom.configMapKeyRef.withOptional
withOptional(optional)
"Specify whether the ConfigMap or its key must be defined"
obj valueFrom.fieldRef
"ObjectFieldSelector selects an APIVersioned field of an object."
fn valueFrom.fieldRef.withApiVersion
withApiVersion(apiVersion)
"Version of the schema the FieldPath is written in terms of, defaults to \"v1\"."
fn valueFrom.fieldRef.withFieldPath
withFieldPath(fieldPath)
"Path of the field to select in the specified API version."
obj valueFrom.resourceFieldRef
"ResourceFieldSelector represents container resources (cpu, memory) and their output format"
fn valueFrom.resourceFieldRef.withContainerName
withContainerName(containerName)
"Container name: required for volumes, optional for env vars"
fn valueFrom.resourceFieldRef.withDivisor
withDivisor(divisor)
"Quantity is a fixed-point representation of a number. It provides convenient marshaling/unmarshaling in JSON and YAML, in addition to String() and AsInt64() accessors.\n\nThe serialization format is:\n\n
fn valueFrom.resourceFieldRef.withResource
withResource(resource)
"Required: resource to select"
obj valueFrom.secretKeyRef
"SecretKeySelector selects a key of a Secret."
fn valueFrom.secretKeyRef.withKey
withKey(key)
"The key of the secret to select from. Must be a valid secret key."
fn valueFrom.secretKeyRef.withName
withName(name)
"Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names"
fn valueFrom.secretKeyRef.withOptional
withOptional(optional)
"Specify whether the Secret or its key must be defined"