Package org.cdk8s.plus20
Interface IPodSpec
-
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
- All Known Subinterfaces:
IPodSpec.Jsii$Default,IPodTemplate,IPodTemplate.Jsii$Default
- All Known Implementing Classes:
DaemonSet,Deployment,IPodSpec.Jsii$Proxy,IPodTemplate.Jsii$Proxy,Job,Pod,PodSpec,PodTemplate,StatefulSet
@Generated(value="jsii-pacmak/1.57.0 (build f614666)", date="2022-04-26T09:02:10.478Z") @Stability(Stable) public interface IPodSpec extends software.amazon.jsii.JsiiSerializable
Represents a resource that can be configured with a kuberenets pod spec. (e.g `Deployment`, `Job`, `Pod`, ...).Use the
PodSpecclass as an implementation helper.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceIPodSpec.Jsii$DefaultInternal default implementation forIPodSpec.static classIPodSpec.Jsii$ProxyA proxy class which represents a concrete javascript instance of this type.
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description ContaineraddContainer(ContainerProps container)Add a container to the pod.ContaineraddInitContainer(ContainerProps container)Add an init container to the pod.voidaddVolume(Volume volume)Add a volume to the pod.List<Container>getContainers()The containers belonging to the pod.PodDnsgetDns()The pod's DNS settings.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.default RestartPolicygetRestartPolicy()Restart policy for all containers within the pod.PodSecurityContextgetSecurityContext()The pod's security context.default IServiceAccountgetServiceAccount()The service account used to run this pod.List<Volume>getVolumes()The volumes associated with this pod.
-
-
-
Method Detail
-
getContainers
@Stability(Stable) @NotNull List<Container> getContainers()
The containers belonging to the pod.Use
addContainerto add containers.
-
getDns
@Stability(Stable) @NotNull PodDns getDns()
The pod's DNS settings.
-
getHostAliases
@Stability(Stable) @NotNull 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.
-
getInitContainers
@Stability(Stable) @NotNull List<Container> getInitContainers()
The init containers belonging to the pod.Use
addInitContainerto add init containers.
-
getSecurityContext
@Stability(Stable) @NotNull PodSecurityContext getSecurityContext()
The pod's security context.
-
getVolumes
@Stability(Stable) @NotNull List<Volume> getVolumes()
The volumes associated with this pod.Use
addVolumeto add volumes.
-
getRestartPolicy
@Stability(Stable) @Nullable default RestartPolicy getRestartPolicy()
Restart policy for all containers within the pod.
-
getServiceAccount
@Stability(Stable) @Nullable default IServiceAccount getServiceAccount()
The service account used to run this pod.
-
addContainer
@Stability(Stable) @NotNull Container addContainer(@NotNull ContainerProps container)
Add a container to the pod.- Parameters:
container- The container. This parameter is required.
-
addInitContainer
@Stability(Stable) @NotNull Container addInitContainer(@NotNull ContainerProps container)
Add an init container to the pod.- Parameters:
container- The container. This parameter is required.
-
addVolume
@Stability(Stable) void addVolume(@NotNull Volume volume)Add a volume to the pod.- Parameters:
volume- The volume. This parameter is required.
-
-