Package org.cdk8s.plus25.k8s
Class EnvVarSource.Builder
- java.lang.Object
-
- org.cdk8s.plus25.k8s.EnvVarSource.Builder
-
- All Implemented Interfaces:
software.amazon.jsii.Builder<EnvVarSource>
- Enclosing interface:
- EnvVarSource
@Stability(Stable) public static final class EnvVarSource.Builder extends Object implements software.amazon.jsii.Builder<EnvVarSource>
A builder forEnvVarSource
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description EnvVarSourcebuild()Builds the configured instance.EnvVarSource.BuilderconfigMapKeyRef(ConfigMapKeySelector configMapKeyRef)Sets the value ofEnvVarSource.getConfigMapKeyRef()EnvVarSource.BuilderfieldRef(ObjectFieldSelector fieldRef)Sets the value ofEnvVarSource.getFieldRef()EnvVarSource.BuilderresourceFieldRef(ResourceFieldSelector resourceFieldRef)Sets the value ofEnvVarSource.getResourceFieldRef()EnvVarSource.BuildersecretKeyRef(SecretKeySelector secretKeyRef)Sets the value ofEnvVarSource.getSecretKeyRef()
-
-
-
Method Detail
-
configMapKeyRef
@Stability(Stable) public EnvVarSource.Builder configMapKeyRef(ConfigMapKeySelector configMapKeyRef)
Sets the value ofEnvVarSource.getConfigMapKeyRef()- Parameters:
configMapKeyRef- Selects a key of a ConfigMap.- Returns:
this
-
fieldRef
@Stability(Stable) public EnvVarSource.Builder fieldRef(ObjectFieldSelector fieldRef)
Sets the value ofEnvVarSource.getFieldRef()- Parameters:
fieldRef- Selects a field of the pod: supports metadata.name, metadata.namespace,metadata.labels['<KEY>'],metadata.annotations['<KEY>'], spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs.- Returns:
this
-
resourceFieldRef
@Stability(Stable) public EnvVarSource.Builder resourceFieldRef(ResourceFieldSelector resourceFieldRef)
Sets the value ofEnvVarSource.getResourceFieldRef()- Parameters:
resourceFieldRef- 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.- Returns:
this
-
secretKeyRef
@Stability(Stable) public EnvVarSource.Builder secretKeyRef(SecretKeySelector secretKeyRef)
Sets the value ofEnvVarSource.getSecretKeyRef()- Parameters:
secretKeyRef- Selects a key of a secret in the pod's namespace.- Returns:
this
-
build
@Stability(Stable) public EnvVarSource build()
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<EnvVarSource>- Returns:
- a new instance of
EnvVarSource - Throws:
NullPointerException- if any required attribute was not provided
-
-