Skip waiting for paused deployments

Signed-off-by: Per Hermansson <perher1@gmail.com>
pull/5789/head
Per Hermansson 6 years ago
parent 9fb19967ba
commit b0e7b8c9d9

@ -71,6 +71,10 @@ func (c *Client) waitForResources(timeout time.Duration, created Result) error {
if err != nil { if err != nil {
return false, err return false, err
} }
// If paused deployment will never be ready
if currentDeployment.Spec.Paused {
continue
}
// Find RS associated with deployment // Find RS associated with deployment
newReplicaSet, err := deploymentutil.GetNewReplicaSet(currentDeployment, kcs.AppsV1()) newReplicaSet, err := deploymentutil.GetNewReplicaSet(currentDeployment, kcs.AppsV1())
if err != nil || newReplicaSet == nil { if err != nil || newReplicaSet == nil {
@ -86,6 +90,10 @@ func (c *Client) waitForResources(timeout time.Duration, created Result) error {
if err != nil { if err != nil {
return false, err return false, err
} }
// If paused deployment will never be ready
if currentDeployment.Spec.Paused {
continue
}
// Find RS associated with deployment // Find RS associated with deployment
newReplicaSet, err := deploymentutil.GetNewReplicaSet(currentDeployment, kcs.AppsV1()) newReplicaSet, err := deploymentutil.GetNewReplicaSet(currentDeployment, kcs.AppsV1())
if err != nil || newReplicaSet == nil { if err != nil || newReplicaSet == nil {
@ -101,6 +109,10 @@ func (c *Client) waitForResources(timeout time.Duration, created Result) error {
if err != nil { if err != nil {
return false, err return false, err
} }
// If paused deployment will never be ready
if currentDeployment.Spec.Paused {
continue
}
// Find RS associated with deployment // Find RS associated with deployment
newReplicaSet, err := deploymentutil.GetNewReplicaSet(currentDeployment, kcs.AppsV1()) newReplicaSet, err := deploymentutil.GetNewReplicaSet(currentDeployment, kcs.AppsV1())
if err != nil || newReplicaSet == nil { if err != nil || newReplicaSet == nil {
@ -116,6 +128,10 @@ func (c *Client) waitForResources(timeout time.Duration, created Result) error {
if err != nil { if err != nil {
return false, err return false, err
} }
// If paused deployment will never be ready
if currentDeployment.Spec.Paused {
continue
}
// Find RS associated with deployment // Find RS associated with deployment
newReplicaSet, err := deploymentutil.GetNewReplicaSet(currentDeployment, kcs.AppsV1()) newReplicaSet, err := deploymentutil.GetNewReplicaSet(currentDeployment, kcs.AppsV1())
if err != nil || newReplicaSet == nil { if err != nil || newReplicaSet == nil {

Loading…
Cancel
Save