Class StatefulSetSpec.Builder

  • Enclosing class:
    StatefulSetSpec

    public static class StatefulSetSpec.Builder
    extends java.lang.Object
    • 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.
      • 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.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object