@Stability(value=Stable) public static final class StatefulSetProps.Builder extends Object implements software.amazon.jsii.Builder<StatefulSetProps>
StatefulSetProps| Constructor and Description |
|---|
Builder() |
@Stability(value=Stable) public StatefulSetProps.Builder service(Service service)
StatefulSetProps.getService()service - Service to associate with the statefulset. This parameter is required.this@Stability(value=Stable) public StatefulSetProps.Builder defaultSelector(Boolean defaultSelector)
StatefulSetProps.getDefaultSelector()defaultSelector - Automatically allocates a pod selector for this statefulset.
If this is set to false you must define your selector through
statefulset.podMetadata.addLabel() and statefulset.selectByLabel().this@Stability(value=Stable) public StatefulSetProps.Builder podManagementPolicy(PodManagementPolicy podManagementPolicy)
StatefulSetProps.getPodManagementPolicy()podManagementPolicy - Pod management policy to use for this statefulset.this@Stability(value=Stable) public StatefulSetProps.Builder replicas(Number replicas)
StatefulSetProps.getReplicas()replicas - Number of desired pods.this@Stability(value=Stable) public StatefulSetProps.Builder metadata(org.cdk8s.ApiObjectMetadata metadata)
ResourceProps.getMetadata()metadata - Metadata that all persisted resources must have, which includes all objects users must create.this@Stability(value=Stable) public StatefulSetProps.Builder podMetadata(org.cdk8s.ApiObjectMetadata podMetadata)
PodTemplateProps.getPodMetadata()podMetadata - The pod metadata.this@Stability(value=Stable) public StatefulSetProps.Builder containers(List<? extends ContainerProps> containers)
PodSpecProps.getContainers()containers - List of containers belonging to the pod.
Containers cannot currently be
added or removed. There must be at least one container in a Pod.
You can add additionnal containers using podSpec.addContainer()
this@Stability(value=Stable) public StatefulSetProps.Builder restartPolicy(RestartPolicy restartPolicy)
PodSpecProps.getRestartPolicy()restartPolicy - Restart policy for all containers within the pod.this@Stability(value=Stable) public StatefulSetProps.Builder serviceAccount(IServiceAccount serviceAccount)
PodSpecProps.getServiceAccount()serviceAccount - A service account provides an identity for processes that run in a Pod.
When you (a human) access the cluster (for example, using kubectl), you are
authenticated by the apiserver as a particular User Account (currently this
is usually admin, unless your cluster administrator has customized your
cluster). Processes in containers inside pods can also contact the
apiserver. When they do, they are authenticated as a particular Service
Account (for example, default).this@Stability(value=Stable) public StatefulSetProps.Builder volumes(List<? extends Volume> volumes)
PodSpecProps.getVolumes()volumes - List of volumes that can be mounted by containers belonging to the pod.
You can also add volumes later using podSpec.addVolume()this@Stability(value=Stable) public StatefulSetProps build()
build in interface software.amazon.jsii.Builder<StatefulSetProps>StatefulSetPropsNullPointerException - if any required attribute was not providedCopyright © 2021. All rights reserved.