Class DeploymentHelper
java.lang.Object
io.kubernetes.client.extended.kubectl.util.deployment.DeploymentHelper
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic 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.
-
Field Details
-
DEFAULT_DEPLOYMENT_UNIQUE_LABEL_KEY
- See Also:
-
REVISION_ANNOTATION
- See Also:
-
-
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 deploymentapi
- the client interfaceoldRSes
- container of all old ReplicaSet exclude the ones with no podsallOldRSes
- container of all old ReplicaSet- Returns:
- the new replica set
- Throws:
io.kubernetes.client.openapi.ApiException
-
revision
revision returns the revision number of the input object.- Parameters:
meta
- metadata of object- Returns:
- the revision number
-