Skip to content

Move CRD fixup hack for 3.11 - #88

Merged
openshift-merge-robot merged 1 commit into
openshift:masterfrom
2uasimojo:crd-fixup
Nov 3, 2020
Merged

openshift-merge-robot merged 1 commit into
openshift:masterfrom
2uasimojo:crd-fixup

Conversation

@2uasimojo

Copy link
Copy Markdown
Member

Due to an OLM bug in OCP 3.11, the generated CRD needs some tweaking. Previously this was being done via a bespoke script invoked through a go:generate directive. After boilerplate adoption, this script was doing operator-sdk generate redundantly (it was already part of the op-generate target).

This commit removes the script and the redundant operator-sdk generates, and adds a temporary make target to do the CRD fixup. All of this will go away once we no longer need to run on 3.11.

Due to an OLM bug in OCP 3.11, the generated CRD needs some tweaking.
Previously this was being done via a bespoke script invoked through a
go:generate directive. After boilerplate adoption, this script was doing
`operator-sdk generate` redundantly (it was already part of the
`op-generate` target).

This commit removes the script and the redundant `operator-sdk
generate`s, and adds a temporary `make` target to do the CRD fixup. All
of this will go away once we no longer need to run on 3.11.
@2uasimojo
2uasimojo requested review from jewzaam and removed request for R-Lawton and robotmaxtron November 3, 2020 20:59
Comment thread Makefile
# call it.
.PHONY: crd-fixup
crd-fixup:
yq d -i deploy/crds/deadmanssnitch.managed.openshift.io_deadmanssnitchintegrations_crd.yaml spec.validation.openAPIV3Schema.type

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Do we have a standardized version of yq?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

It's in the boilerplate image

@georgettica

Copy link
Copy Markdown
Contributor

Is this change going to be in the boilerplate? I am asking as another operator has concerns for the CRD deployment

@jewzaam

jewzaam commented Nov 3, 2020

Copy link
Copy Markdown
Member

/approve

@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Nov 3, 2020
@2uasimojo

Copy link
Copy Markdown
Member Author

Is this change going to be in the boilerplate? I am asking as another operator has concerns for the CRD deployment

Yeah, that's a good question. I'd like to solve this one by hand the first time around to make sure it's working, and then we can look at making it generic (we'll have to discover which files to apply the fixup to).

It's temporary (only as long as 3.11 lives) so not worth putting a whole lot of effort into.

@dustman9000

Copy link
Copy Markdown
Member

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Nov 3, 2020
@openshift-ci-robot

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: 2uasimojo, dustman9000, jewzaam

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

The pull request process is described here

Details 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

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.

7 participants