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

Verify CRD's condition to ensure it's registered with k8s API (rebased) #614

Merged
merged 4 commits into from
Dec 20, 2018

Conversation

jpeeler
Copy link

@jpeeler jpeeler commented Dec 10, 2018

This is Vu's #553, but rebased and with tests passing (should be at least!). It has been modified from his original code slightly - mainly instead of creating a crdWithStatus, instead uses crdWithoutStatus which required far less code modification.

dinhxuanvu and others added 2 commits December 10, 2018 14:59
OLM needs to verify CRD's condition to make sure it is registered
with k8s API during CSV control loop before installing operator.
This verification will help to avoid errors related to the
unavailability of an API when installing an operator via OLM.

Jira: https://jira.coreos.com/browse/ALM-775

Signed-off-by: Vu Dinh <vdinh@redhat.com>
This allows log level changes in the unit tests to be respected. Also,
change operator groups default level to debug.
@openshift-ci-robot openshift-ci-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Dec 10, 2018
@jpeeler
Copy link
Author

jpeeler commented Dec 10, 2018

Copied from old PR:

OLM needs to verify CRD's condition to make sure it is registered
with k8s API during CSV control loop before installing operator.
This verification will help to avoid errors related to the
unavailability of an API when installing an operator via OLM.

Jira: https://jira.coreos.com/browse/ALM-775

namespace,
"",
installStrategy("csv1-dep", nil, nil),
[]*v1beta1.CustomResourceDefinition{crdWithoutStatus("c1", "v2")},
Copy link
Member

Choose a reason for hiding this comment

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

I think I'm missing what makes this CRD be unavailable? What's the difference between this test and the previous?

@jpeeler jpeeler force-pushed the jeff-533 branch 2 times, most recently from 9f13db7 to 7a4aaf0 Compare December 11, 2018 21:33
Change the default `crd` function to return appropriate status as to
pass the requirement checks. Also, make some minor logging improvements.
@jpeeler
Copy link
Author

jpeeler commented Dec 11, 2018

/retest
This passed for me locally.

@jpeeler
Copy link
Author

jpeeler commented Dec 12, 2018

/retest

1 similar comment
@jpeeler
Copy link
Author

jpeeler commented Dec 14, 2018

/retest

@jpeeler
Copy link
Author

jpeeler commented Dec 15, 2018

/approve

@openshift-ci-robot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jpeeler

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 15, 2018
),
existingObjs: nil,
existingExtObjs: []runtime.Object{
func() *v1beta1.CustomResourceDefinition {
Copy link
Member

Choose a reason for hiding this comment

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

Cool!

@ecordell
Copy link
Member

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Dec 18, 2018
@jpeeler
Copy link
Author

jpeeler commented Dec 19, 2018

/retest

2 similar comments
@jpeeler
Copy link
Author

jpeeler commented Dec 19, 2018

/retest

@njhale
Copy link
Member

njhale commented Dec 20, 2018

/retest

@openshift-merge-robot openshift-merge-robot merged commit 61486be into operator-framework:master Dec 20, 2018
ecordell pushed a commit to ecordell/operator-lifecycle-manager that referenced this pull request Mar 8, 2019
Verify CRD's condition to ensure it's registered with k8s API (rebased)
@njhale njhale added the kind/feature Categorizes issue or PR as related to a new feature. label Mar 19, 2019
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. kind/feature Categorizes issue or PR as related to a new feature. lgtm Indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants