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

Set up CustomNoUpgrade copies of CRDs #1490

Merged

Conversation

JoelSpeed
Copy link
Contributor

This is a continuation of #1481

We need to have a copy of the CRD for CRDs that are non-default for all available FeatureSets (that is Default, TechPreviewNoUpgrade and CustomNoUpgrade.

Without these, CustomNoUpgrade clusters cannot bootstrap as the CVO does not know which CRD to install.

For now, this updates the CustomNoUpgrade features to be identical to TechPreviewNoUpgrade, in the future, users should be able to make a distinction between the two. However, I suspect everything in TechPreviewNoUpgrade should be in CustomNoUpgrade as well.

Note, we need openshift/kubernetes-sigs-controller-tools#15 to make this work, changes are pulled in manually now but will need to update the go.mod before merge

CC @wking

@openshift-ci openshift-ci bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jun 13, 2023
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jun 13, 2023

Hello @JoelSpeed! Some important instructions when contributing to openshift/api:
API design plays an important part in the user experience of OpenShift and as such API PRs are subject to a high level of scrutiny to ensure they follow our best practices. If you haven't already done so, please review the OpenShift API Conventions and ensure that your proposed changes are compliant. Following these conventions will help expedite the api review process for your PR.

@openshift-ci openshift-ci bot added the size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. label Jun 13, 2023
@openshift-ci openshift-ci bot requested review from derekwaynecarr and soltysh June 13, 2023 14:32
@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jun 13, 2023
@JoelSpeed JoelSpeed changed the title [WIP] Set up CustomNoUpgrade copies of CRDs Set up CustomNoUpgrade copies of CRDs Jun 13, 2023
@openshift-ci openshift-ci bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jun 13, 2023
CustomNoUpgrade is even-more-cutting-edge than TechPreviewNoUpgrade
[1].  Before this commit, custom resources with properties with:

  +openshift:enable:FeatureSets=TechPreviewNoUpgrade

were being sharded into Default and TechPreviewNoUpgrade flavors,
which left CustomNoUpgrade clusters with neither shard.  With this
commit, the CustomNoUpgrade cluster will get the same CRD as the
TechPreviewNoUpgrade cluster.  It's not entirely clear to me how folks
would annotate a CustomNoUpgrade-only resource, because:

  +openshift:enable:FeatureSets=CustomNoUpgrade

might not generate a:

  release.openshift.io/feature-set: TechPreviewNoUpgrade,Default

manifest for the less-cutting-edge clusters.  But we can work that out
in future work, and get this commit in now to get CustomNoUpgrade back
off the ground.

Generated with:

  $ sed -i 's/openshift:enable:FeatureSets=TechPreviewNoUpgrade/openshift:enable:FeatureSets=CustomNoUpgrade,TechPreviewNoUpgrade/' $(git grep -l openshift:enable:FeatureSets=)

[1]: openshift#370 (comment)
@JoelSpeed JoelSpeed force-pushed the customnoupgrade-crds branch from f5a463c to 744c871 Compare June 13, 2023 16:04
@wking
Copy link
Member

wking commented Jun 13, 2023

Integration run:

could not determine test suite CRD version: could not load CRD: could not load CRD: open /go/src/github.com/openshift/api/example/v1/0000_50_stabletype-techpreview.crd.yaml: no such file or directory

Looks like a string that needs to be updated to the new 0000_50_stabletype-TechPreviewNoUpgrade.crd.yaml?

@JoelSpeed
Copy link
Contributor Author

Integration run:

could not determine test suite CRD version: could not load CRD: could not load CRD: open /go/src/github.com/openshift/api/example/v1/0000_50_stabletype-techpreview.crd.yaml: no such file or directory

Looks like a string that needs to be updated to the new 0000_50_stabletype-TechPreviewNoUpgrade.crd.yaml?

Just pushed that as you commented, should be better now

@@ -57,7 +57,7 @@ type DNSSpec struct {
// infrastructure provider for DNS.
// When omitted, this means the user has no opinion and the platform is left
// to choose reasonable defaults. These defaults are subject to change over time.
// +openshift:enable:FeatureSets=TechPreviewNoUpgrade
// +openshift:enable:FeatureSets=CustomNoUpgrade;TechPreviewNoUpgrade
Copy link
Member

Choose a reason for hiding this comment

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

97802d4 doesn't describe the delimiter pivot from , to ;. Is that a restriction of the kubebuilder syntax?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah that's parts of the syntax, different values within the same set should be ; separated. If a validation rule has multiple different parameters, these are , separated, so you could have:

a:b:c=foo=1;2,bar=3;4

Then the code has the input foo: [1, 2], bar: [3, 4]

Copy link
Member

@wking wking left a comment

Choose a reason for hiding this comment

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

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Jun 13, 2023
@JoelSpeed JoelSpeed force-pushed the customnoupgrade-crds branch from 744c871 to 300d3b6 Compare June 13, 2023 16:19
@openshift-ci openshift-ci bot removed the lgtm Indicates that a PR is ready to be merged. label Jun 13, 2023
@JoelSpeed
Copy link
Contributor Author

/retest

These pass locally, wonder if there's some weird merging happening

@JoelSpeed JoelSpeed force-pushed the customnoupgrade-crds branch from 300d3b6 to 1fa9175 Compare June 13, 2023 16:53
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jun 13, 2023

@JoelSpeed: all tests passed!

Full PR test history. Your PR dashboard.

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. I understand the commands that are listed here.

Copy link
Member

@wking wking left a comment

Choose a reason for hiding this comment

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

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Jun 13, 2023
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jun 13, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: JoelSpeed, wking

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

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. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants