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.57.0 (build f614666)", date="2022-04-26T09:02:10.540Z") @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 cont)Add a container to the pod.voidaddHostAlias(HostAlias hostAlias)ContaineraddInitContainer(ContainerProps cont)Add an init container to the pod.voidaddVolume(Volume vol)Add a volume to the pod.List<Container>getContainers()The containers belonging to the pod.PodDnsgetDns()The pod's DNS settings.DockerConfigSecretgetDockerRegistryAuth()List<HostAlias>getHostAliases()An optional list of hosts and IPs that will be injected into the pod's hosts file if specified.List<Container>getInitContainers()The init containers belonging to the pod.RestartPolicygetRestartPolicy()Restart policy for all containers within the pod.PodSecurityContextgetSecurityContext()The pod's security context.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 cont)
Add a container to the pod.- Specified by:
addContainerin interfaceIPodSpec- Parameters:
cont- This parameter is required.
-
addHostAlias
@Stability(Stable) public void addHostAlias(@NotNull HostAlias hostAlias)- Parameters:
hostAlias- This parameter is required.
-
addInitContainer
@Stability(Stable) @NotNull public Container addInitContainer(@NotNull ContainerProps cont)
Add an init container to the pod.- Specified by:
addInitContainerin interfaceIPodSpec- Parameters:
cont- This parameter is required.
-
addVolume
@Stability(Stable) public void addVolume(@NotNull Volume vol)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
-
getDns
@Stability(Stable) @NotNull public PodDns getDns()
The pod's DNS settings.
-
getHostAliases
@Stability(Stable) @NotNull public List<HostAlias> getHostAliases()
An optional list of hosts and IPs that will be injected into the pod's hosts file if specified.This is only valid for non-hostNetwork pods.
- Specified by:
getHostAliasesin interfaceIPodSpec
-
getInitContainers
@Stability(Stable) @NotNull public List<Container> getInitContainers()
The init containers belonging to the pod.Use
addInitContainerto add init containers.- Specified by:
getInitContainersin interfaceIPodSpec
-
getSecurityContext
@Stability(Stable) @NotNull public PodSecurityContext getSecurityContext()
The pod's security context.- Specified by:
getSecurityContextin interfaceIPodSpec
-
getVolumes
@Stability(Stable) @NotNull public List<Volume> getVolumes()
The volumes associated with this pod.Use
addVolumeto add volumes.- Specified by:
getVolumesin interfaceIPodSpec
-
getDockerRegistryAuth
@Stability(Stable) @Nullable public DockerConfigSecret getDockerRegistryAuth()
-
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
-
-