Skip to content
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

Add OLM support for the Upgradeable OperatorCondition and Admin overrides #1885

Conversation

dinhxuanvu
Copy link
Member

Description of the change:
OLM will check for OperatorCondition CR for OperatorUpgradeable status.
The pending CSV will not transition to Succeeded status until the operator
is upgradeable based on the OperatorCondition. If the operator doesn't use
OperatorCondition, the normal transition is expected.

Signed-off-by: Vu Dinh vdinh@redhat.com
Motivation for the change:

Reviewer Checklist

  • Implementation matches the proposed design, or proposal is updated to match implementation
  • Sufficient unit test coverage
  • Sufficient end-to-end test coverage
  • Docs updated or added to /docs
  • Commit messages sensible and descriptive

@dinhxuanvu dinhxuanvu force-pushed the create-operatorconditions-for-operator branch 2 times, most recently from 934fd4c to 9295579 Compare December 3, 2020 14:59
@dinhxuanvu dinhxuanvu force-pushed the create-operatorconditions-for-operator branch 2 times, most recently from c8eeb8c to bbe89b4 Compare December 3, 2020 15:22
@ecordell
Copy link
Member

ecordell commented Dec 3, 2020

Don't we also want something that can prevent the resolver from looking for updates if an operator is not upgradable?

@dinhxuanvu
Copy link
Member Author

dinhxuanvu commented Dec 3, 2020

Don't we also want something that can prevent the resolver from looking for updates if an operator is not upgradable?

We talked about this (Ben asked about this) and we agreed that at this point we don't want the resolver to be involved into this. This is meant to be a separate part from the resolver and it simply prevents the operator proceed to Succeeded state but not blocking the entire resolution altogether.

@dinhxuanvu dinhxuanvu force-pushed the create-operatorconditions-for-operator branch 7 times, most recently from dbf0611 to 02ca349 Compare December 4, 2020 04:51
@dinhxuanvu
Copy link
Member Author

/retest

1 similar comment
@dinhxuanvu
Copy link
Member Author

/retest

@awgreene
Copy link
Member

awgreene commented Dec 4, 2020

/hold

@openshift-ci-robot openshift-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Dec 4, 2020
@dinhxuanvu
Copy link
Member Author

/hold cancel

@openshift-ci-robot openshift-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Dec 4, 2020
@dinhxuanvu dinhxuanvu force-pushed the create-operatorconditions-for-operator branch from b393e4d to e3f09a9 Compare December 4, 2020 15:26
Copy link
Member

@awgreene awgreene left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work @dinhxuanvu !

pkg/controller/operators/olm/operatorconditions.go Outdated Show resolved Hide resolved
@dinhxuanvu dinhxuanvu force-pushed the create-operatorconditions-for-operator branch from e3f09a9 to a7551c1 Compare December 4, 2020 15:36
@awgreene
Copy link
Member

awgreene commented Dec 4, 2020

/approve

@openshift-ci-robot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: awgreene, dinhxuanvu

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 Dec 4, 2020
@kevinrizza
Copy link
Member

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Dec 4, 2020
@dinhxuanvu dinhxuanvu force-pushed the create-operatorconditions-for-operator branch from a7551c1 to f9ff01a Compare December 4, 2020 18:46
@openshift-ci-robot openshift-ci-robot removed the lgtm Indicates that a PR is ready to be merged. label Dec 4, 2020
@dinhxuanvu dinhxuanvu force-pushed the create-operatorconditions-for-operator branch 2 times, most recently from 2fab671 to c1506cf Compare December 4, 2020 19:24
@dinhxuanvu
Copy link
Member Author

/retest

1 similar comment
@dinhxuanvu
Copy link
Member Author

/retest

@dinhxuanvu dinhxuanvu force-pushed the create-operatorconditions-for-operator branch 3 times, most recently from cb1fe22 to b35528a Compare December 4, 2020 22:05
@awgreene
Copy link
Member

awgreene commented Dec 4, 2020

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Dec 4, 2020
OLM will check for OperatorCondition CR for OperatorUpgradeable status.
The pending CSV will not transition to Succeeded status until the operator
is upgradeable based on the OperatorCondition. If the operator doesn't use
OperatorCondition, the normal transition is expected.

Cluster Admin will be able to override the OperatorUpgradeable condition.

Add an e2e test for OperatorUpgradeable condition.

OLM will check for replacedCSV's Upgradeable condition to ensure the new CSV is
able to be upgraded. If the previous condition is False, the new CSV will stay
in Pending to prevent the deployment to be installed.

Signed-off-by: Vu Dinh <vdinh@redhat.com>
@dinhxuanvu dinhxuanvu force-pushed the create-operatorconditions-for-operator branch from b35528a to abaf218 Compare December 4, 2020 22:26
@openshift-ci-robot openshift-ci-robot removed the lgtm Indicates that a PR is ready to be merged. label Dec 4, 2020
@awgreene
Copy link
Member

awgreene commented Dec 4, 2020

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Dec 4, 2020
@dinhxuanvu
Copy link
Member Author

/retest

2 similar comments
@dinhxuanvu
Copy link
Member Author

/retest

@dinhxuanvu
Copy link
Member Author

/retest

@openshift-merge-robot openshift-merge-robot merged commit 4ee4e87 into operator-framework:master Dec 5, 2020
@jianzhangbjz
Copy link
Contributor

/QE-approved

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.

None yet

7 participants