java.lang.Object
io.kubernetes.client.extended.kubectl.util.deployment.DeploymentHelper

public class DeploymentHelper extends Object
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
     
    static final String
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static io.kubernetes.client.openapi.models.V1ReplicaSet
    getAllReplicaSets(io.kubernetes.client.openapi.models.V1Deployment deployment, io.kubernetes.client.openapi.apis.AppsV1Api api, List<io.kubernetes.client.openapi.models.V1ReplicaSet> oldRSes, List<io.kubernetes.client.openapi.models.V1ReplicaSet> allOldRSes)
    getAllReplicaSets get the old replica sets and return new replica targeted by the given Deployment.
    static Long
    revision(io.kubernetes.client.openapi.models.V1ObjectMeta meta)
    revision returns the revision number of the input object.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • Constructor Details

    • DeploymentHelper

      public DeploymentHelper()
  • Method Details

    • getAllReplicaSets

      public static io.kubernetes.client.openapi.models.V1ReplicaSet getAllReplicaSets(io.kubernetes.client.openapi.models.V1Deployment deployment, io.kubernetes.client.openapi.apis.AppsV1Api api, List<io.kubernetes.client.openapi.models.V1ReplicaSet> oldRSes, List<io.kubernetes.client.openapi.models.V1ReplicaSet> allOldRSes) throws io.kubernetes.client.openapi.ApiException
      getAllReplicaSets get the old replica sets and return new replica targeted by the given Deployment. It gets PodList and ReplicaSetList from client interface. Note that the first set of old replica sets doesn't include the ones with no pods, and the second set of old replica sets include all old replica sets. The returned value is the new replica set, and it may be nil if it doesn't exist yet.
      Parameters:
      deployment - the given deployment
      api - the client interface
      oldRSes - container of all old ReplicaSet exclude the ones with no pods
      allOldRSes - container of all old ReplicaSet
      Returns:
      the new replica set
      Throws:
      io.kubernetes.client.openapi.ApiException
    • revision

      public static Long revision(io.kubernetes.client.openapi.models.V1ObjectMeta meta)
      revision returns the revision number of the input object.
      Parameters:
      meta - metadata of object
      Returns:
      the revision number