Package org.cdk8s.plus25
Class Env
- java.lang.Object
-
- software.amazon.jsii.JsiiObject
-
- org.cdk8s.plus25.Env
-
- All Implemented Interfaces:
software.amazon.jsii.JsiiSerializable
@Generated(value="jsii-pacmak/1.88.0 (build eaabd08)", date="2023-09-11T06:17:58.268Z") @Stability(Stable) public class Env extends software.amazon.jsii.JsiiObject
Container environment variables.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddVariable(String name, EnvValue value)Add a single variable by name and value.voidcopyFrom(EnvFrom from)Add a collection of variables by copying from another source.static EnvFromfromConfigMap(IConfigMap configMap)Selects a ConfigMap to populate the environment variables with.static EnvFromfromConfigMap(IConfigMap configMap, String prefix)Selects a ConfigMap to populate the environment variables with.static EnvFromfromSecret(ISecret secr)Selects a Secret to populate the environment variables with.List<EnvFrom>getSources()The list of sources used to populate the container environment, in addition to thevariables.Map<String,EnvValue>getVariables()The environment variables for this container.-
Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet
-
-
-
-
Method Detail
-
fromConfigMap
@Stability(Stable) @NotNull public static EnvFrom fromConfigMap(@NotNull IConfigMap configMap, @Nullable String prefix)
Selects a ConfigMap to populate the environment variables with.The contents of the target ConfigMap's Data field will represent the key-value pairs as environment variables.
- Parameters:
configMap- This parameter is required.prefix-
-
fromConfigMap
@Stability(Stable) @NotNull public static EnvFrom fromConfigMap(@NotNull IConfigMap configMap)
Selects a ConfigMap to populate the environment variables with.The contents of the target ConfigMap's Data field will represent the key-value pairs as environment variables.
- Parameters:
configMap- This parameter is required.
-
fromSecret
@Stability(Stable) @NotNull public static EnvFrom fromSecret(@NotNull ISecret secr)
Selects a Secret to populate the environment variables with.The contents of the target Secret's Data field will represent the key-value pairs as environment variables.
- Parameters:
secr- This parameter is required.
-
addVariable
@Stability(Stable) public void addVariable(@NotNull String name, @NotNull EnvValue value)Add a single variable by name and value.The variable value can come from various dynamic sources such a secrets of config maps. Use
EnvValue.fromXXXto select sources.- Parameters:
name- This parameter is required.value- This parameter is required.
-
copyFrom
@Stability(Stable) public void copyFrom(@NotNull EnvFrom from)Add a collection of variables by copying from another source.Use
Env.fromXXXfunctions to select sources.- Parameters:
from- This parameter is required.
-
getSources
@Stability(Stable) @NotNull public List<EnvFrom> getSources()
The list of sources used to populate the container environment, in addition to thevariables.Returns a copy. To add a source use
container.env.copyFrom().
-
-