Package org.cdk8s.plus24
Class Env
- java.lang.Object
-
- software.amazon.jsii.JsiiObject
-
- org.cdk8s.plus24.Env
-
- All Implemented Interfaces:
software.amazon.jsii.JsiiSerializable
@Generated(value="jsii-pacmak/1.75.0 (build 63bb957)", date="2023-02-20T02:42:01.847Z") @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 void
addVariable(String name, EnvValue value)
Add a single variable by name and value.void
copyFrom(EnvFrom from)
Add a collection of variables by copying from another source.static EnvFrom
fromConfigMap(IConfigMap configMap)
Selects a ConfigMap to populate the environment variables with.static EnvFrom
fromConfigMap(IConfigMap configMap, String prefix)
Selects a ConfigMap to populate the environment variables with.static EnvFrom
fromSecret(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 the `variables`.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.fromXXX
to 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.fromXXX
functions 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 the `variables`.Returns a copy. To add a source use
container.env.copyFrom()
.
-
-