Class StatefulSetSpec.Builder
- java.lang.Object
-
- com.marcnuri.yakc.model.io.k8s.api.apps.v1beta2.StatefulSetSpec.Builder
-
- Enclosing class:
- StatefulSetSpec
public static class StatefulSetSpec.Builder extends java.lang.Object
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StatefulSetSpec.Builder
addToVolumeClaimTemplates(PersistentVolumeClaim addToVolumeClaimTemplates)
StatefulSetSpec
build()
StatefulSetSpec.Builder
clearVolumeClaimTemplates()
StatefulSetSpec.Builder
podManagementPolicy(java.lang.String podManagementPolicy)
podManagementPolicy controls how pods are created during initial scale up, when replacing pods on nodes, or when scaling down.StatefulSetSpec.Builder
replicas(java.lang.Number replicas)
replicas is the desired number of replicas of the given Template.StatefulSetSpec.Builder
revisionHistoryLimit(java.lang.Number revisionHistoryLimit)
revisionHistoryLimit is the maximum number of revisions that will be maintained in the StatefulSet's revision history.StatefulSetSpec.Builder
selector(@NonNull LabelSelector selector)
StatefulSetSpec.Builder
serviceName(@NonNull java.lang.String serviceName)
serviceName is the name of the service that governs this StatefulSet.StatefulSetSpec.Builder
template(@NonNull PodTemplateSpec template)
java.lang.String
toString()
StatefulSetSpec.Builder
updateStrategy(StatefulSetUpdateStrategy updateStrategy)
StatefulSetSpec.Builder
volumeClaimTemplates(java.util.Collection<? extends PersistentVolumeClaim> volumeClaimTemplates)
-
-
-
Method Detail
-
podManagementPolicy
public StatefulSetSpec.Builder podManagementPolicy(java.lang.String podManagementPolicy)
podManagementPolicy controls how pods are created during initial scale up, when replacing pods on nodes, or when scaling down. The default policy is `OrderedReady`, where pods are created in increasing order (pod-0, then pod-1, etc) and the controller will wait until each pod is ready before continuing. When scaling down, the pods are removed in the opposite order. The alternative policy is `Parallel` which will create pods in parallel to match the desired scale without waiting, and on scale down will delete all pods at once.- Returns:
this
.
-
replicas
public StatefulSetSpec.Builder replicas(java.lang.Number replicas)
replicas is the desired number of replicas of the given Template. These are replicas in the sense that they are instantiations of the same Template, but individual replicas also have a consistent identity. If unspecified, defaults to 1.- Returns:
this
.
-
revisionHistoryLimit
public StatefulSetSpec.Builder revisionHistoryLimit(java.lang.Number revisionHistoryLimit)
revisionHistoryLimit is the maximum number of revisions that will be maintained in the StatefulSet's revision history. The revision history consists of all revisions not represented by a currently applied StatefulSetSpec version. The default value is 10.- Returns:
this
.
-
selector
public StatefulSetSpec.Builder selector(@NonNull @NonNull LabelSelector selector)
-
serviceName
public StatefulSetSpec.Builder serviceName(@NonNull @NonNull java.lang.String serviceName)
serviceName is the name of the service that governs this StatefulSet. This service must exist before the StatefulSet, and is responsible for the network identity of the set. Pods get DNS/hostnames that follow the pattern: pod-specific-string.serviceName.default.svc.cluster.local where "pod-specific-string" is managed by the StatefulSet controller.- Returns:
this
.
-
template
public StatefulSetSpec.Builder template(@NonNull @NonNull PodTemplateSpec template)
-
updateStrategy
public StatefulSetSpec.Builder updateStrategy(StatefulSetUpdateStrategy updateStrategy)
-
addToVolumeClaimTemplates
public StatefulSetSpec.Builder addToVolumeClaimTemplates(PersistentVolumeClaim addToVolumeClaimTemplates)
-
volumeClaimTemplates
public StatefulSetSpec.Builder volumeClaimTemplates(java.util.Collection<? extends PersistentVolumeClaim> volumeClaimTemplates)
-
clearVolumeClaimTemplates
public StatefulSetSpec.Builder clearVolumeClaimTemplates()
-
build
public StatefulSetSpec build()
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-