Package org.cdk8s.plus20
Class PodSpec
- java.lang.Object
-
- software.amazon.jsii.JsiiObject
-
- org.cdk8s.plus20.PodSpec
-
- All Implemented Interfaces:
IPodSpec,software.amazon.jsii.JsiiSerializable
- Direct Known Subclasses:
PodTemplate
@Generated(value="jsii-pacmak/1.55.1 (build 07d2d90)", date="2022-04-02T02:38:57.565Z") @Stability(Stable) public class PodSpec extends software.amazon.jsii.JsiiObject implements IPodSpec
Provides read/write capabilities ontop of a `PodSpecProps`.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classPodSpec.BuilderA fluent builder forPodSpec.-
Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationMode
-
Nested classes/interfaces inherited from interface org.cdk8s.plus20.IPodSpec
IPodSpec.Jsii$Default, IPodSpec.Jsii$Proxy
-
-
Constructor Summary
Constructors Modifier Constructor Description PodSpec()PodSpec(PodSpecProps props)protectedPodSpec(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)protectedPodSpec(software.amazon.jsii.JsiiObjectRef objRef)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ContaineraddContainer(ContainerProps container)Add a container to the pod.voidaddVolume(Volume volume)Add a volume to the pod.List<Container>getContainers()The containers belonging to the pod.RestartPolicygetRestartPolicy()Restart policy for all containers within the pod.IServiceAccountgetServiceAccount()The service account used to run this pod.List<Volume>getVolumes()The volumes associated with this pod.-
Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet
-
-
-
-
Constructor Detail
-
PodSpec
protected PodSpec(software.amazon.jsii.JsiiObjectRef objRef)
-
PodSpec
protected PodSpec(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
-
PodSpec
@Stability(Stable) public PodSpec(@Nullable PodSpecProps props)- Parameters:
props-
-
PodSpec
@Stability(Stable) public PodSpec()
-
-
Method Detail
-
addContainer
@Stability(Stable) @NotNull public Container addContainer(@NotNull ContainerProps container)
Add a container to the pod.- Specified by:
addContainerin interfaceIPodSpec- Parameters:
container- This parameter is required.
-
addVolume
@Stability(Stable) public void addVolume(@NotNull Volume volume)Add a volume to the pod.
-
getContainers
@Stability(Stable) @NotNull public List<Container> getContainers()
The containers belonging to the pod.Use
addContainerto add containers.- Specified by:
getContainersin interfaceIPodSpec
-
getVolumes
@Stability(Stable) @NotNull public List<Volume> getVolumes()
The volumes associated with this pod.Use
addVolumeto add volumes.- Specified by:
getVolumesin interfaceIPodSpec
-
getRestartPolicy
@Stability(Stable) @Nullable public RestartPolicy getRestartPolicy()
Restart policy for all containers within the pod.- Specified by:
getRestartPolicyin interfaceIPodSpec
-
getServiceAccount
@Stability(Stable) @Nullable public IServiceAccount getServiceAccount()
The service account used to run this pod.- Specified by:
getServiceAccountin interfaceIPodSpec
-
-