Skip to content

Simplify deployment status check to reduce flapping. #2147

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

benluddy
Copy link
Contributor

@benluddy benluddy commented May 7, 2021

The deployment status logic (originally based on kubectl's rollout
status) can impact its ClusterServiceVersion's status (e.g. by sending
it to Failed/ComponentUnhealthy or triggering reinstallation). If
these ClusterServiceVersion status updates are generated when no
changes have been made to the Deployment spec and when the Deployment
itself has condition Available: True, then the usefulness of
ClusterServiceVersion statuses as a signal is reduced.

This patch changes the deployment status logic so that it is
considered "done" when a) there are no replicas from earlier
generations, and b) the Deployment has condition Available: true.

The deployment status logic (originally based on kubectl's rollout
status) can impact its ClusterServiceVersion's status (e.g. by sending
it to Failed/ComponentUnhealthy or triggering reinstallation). If
these ClusterServiceVersion status updates are generated when no
changes have been made to the Deployment spec and when the Deployment
itself has condition Available: True, then the usefulness of
ClusterServiceVersion statuses as a signal is reduced.

This patch changes the deployment status logic so that it is
considered "done" when a) there are no replicas from earlier
generations, and b) the Deployment has condition Available: true.

Signed-off-by: Ben Luddy <[email protected]>
@benluddy benluddy requested a review from ecordell May 7, 2021 17:15
@openshift-ci-robot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: benluddy

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label May 7, 2021
@benluddy
Copy link
Contributor Author

benluddy commented May 7, 2021

#2092

@ecordell
Copy link
Member

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label May 11, 2021
@openshift-merge-robot openshift-merge-robot merged commit a326d83 into operator-framework:master May 11, 2021
@benluddy
Copy link
Contributor Author

/cherry-pick release-4.7

@openshift-cherrypick-robot

@benluddy: new pull request created: #2170

In response to this:

/cherry-pick release-4.7

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants