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

Use CRD & Webhook v1 APIs #3360

Merged
merged 1 commit into from Jun 29, 2020
Merged

Use CRD & Webhook v1 APIs #3360

merged 1 commit into from Jun 29, 2020

Conversation

matzew
Copy link
Member

@matzew matzew commented Jun 22, 2020

Signed-off-by: Matthias Wessendorf mwessend@redhat.com

Fixes #3349

Proposed Changes

  • using v1 of the CRD type

Release Note

Our CustomResourceDefinitions now use apiextensions.k8s.io/v1 APIs

Docs

@knative-prow-robot knative-prow-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jun 22, 2020
@googlebot googlebot added the cla: yes Indicates the PR's author has signed the CLA. label Jun 22, 2020
@knative-prow-robot knative-prow-robot added size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Jun 22, 2020
@matzew
Copy link
Member Author

matzew commented Jun 22, 2020

@dprotaso FYI I've started this on eventing

@dprotaso
Copy link
Member

This change is required for conversion with v1 CRD APIs to work

knative/pkg#1433

@matzew
Copy link
Member Author

matzew commented Jun 22, 2020

@dprotaso thanks for the heads-up, I've updated the PR

- name: v1beta1
served: true
storage: true
# conversionReviewVersions: ["v1beta1", "v1alpha1"]
Copy link
Member Author

Choose a reason for hiding this comment

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

@vaikas you did disable the conversion, in this PR: #2595

I guess, we can now enable it ? 🤔

scope: Namespaced
conversion:
strategy: Webhook
conversionReviewVersions: ["v1beta1", "v1alpha1"]
Copy link
Member

Choose a reason for hiding this comment

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

These versions are the payload being set to the webhook - not the CRD version being reviewed

Suggested change
conversionReviewVersions: ["v1beta1", "v1alpha1"]
conversionReviewVersions: ["v1", "v1beta1"]

Copy link
Member

Choose a reason for hiding this comment

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

We need both v1 and v1beta1 because our min K8s version is 1.16.

The API imposes a restriction that we support conversionReview version that are available on K8s 1.15 & 1.16.

We can't drop v1beta1 it was the only available version in 1.15

@matzew matzew force-pushed the CRD_v1 branch 4 times, most recently from a94d511 to d012f2a Compare June 23, 2020 19:07
@matzew matzew changed the title WIP: starting to use CRD_v1 APIs Starting to use CRD_v1 APIs Jun 23, 2020
@knative-prow-robot knative-prow-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jun 23, 2020
@matzew
Copy link
Member Author

matzew commented Jun 23, 2020

/hold

@knative-prow-robot knative-prow-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jun 23, 2020
# see issue: https://github.com/knative/serving/issues/912
x-kubernetes-preserve-unknown-fields: true
versions:
- &version
Copy link
Member

Choose a reason for hiding this comment

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

😱

Copy link
Member Author

Choose a reason for hiding this comment

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

well, we do that already with everything on the verbs ;-)

but yeah 🙄

Copy link
Member

Choose a reason for hiding this comment

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

Nah, it is fine :) Just some YAML magic that I didn't know before :)
Actually gets rid of some dupes, which is nice

@aliok
Copy link
Member

aliok commented Jun 24, 2020

/retest

@matzew matzew changed the title Starting to use CRD_v1 APIs Use CRD & Webhook v1 APIs Jun 24, 2020
@matzew
Copy link
Member Author

matzew commented Jun 24, 2020

/hold

waiting for review from at least @dprotaso

@matzew
Copy link
Member Author

matzew commented Jun 24, 2020

/retest

@anishj0shi
Copy link
Contributor

anishj0shi commented Jun 24, 2020

does this PR also updates the MutatingWebhookConfiguration and ValidatingWebhookConfiguration CRs to v1?

@matzew
Copy link
Member Author

matzew commented Jun 24, 2020

does this PR also updates the MutatingWebhookConfiguration and ValidatingWebhookConfiguration CRs to v1?

no - we should track bumping this as well, since its relevant for all of knative, at some point...

This PR is a follow up of the work that @dprotaso did on pkg and serving for CRDs. I'd vote for smaller PRs

@anishj0shi
Copy link
Contributor

@matzew and @dprotaso I've raised a PR for updating eventing webhook: #3409

@knative-prow-robot knative-prow-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jun 24, 2020
@knative-prow-robot knative-prow-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jun 25, 2020
@matzew
Copy link
Member Author

matzew commented Jun 25, 2020

/test pull-knative-eventing-integration-tests

1 similar comment
@matzew
Copy link
Member Author

matzew commented Jun 25, 2020

/test pull-knative-eventing-integration-tests

@matzew matzew changed the title WIP: Use CRD & Webhook v1 APIs Use CRD & Webhook v1 APIs Jun 25, 2020
@knative-prow-robot knative-prow-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jun 25, 2020
@dprotaso
Copy link
Member

migrator job is failing

job.batch/storage-version-migration-v016 created
Waiting until all batch jobs in namespace knative-eventing run to completion.......................................................................................................................................................
ERROR: timeout waiting for jobs to complete
storage-version-migration-v016   1     <none>

I'd recommend dumping some logs in the test for more visibility

clientConfig:
service:
name: eventing-webhook
namespace: knative-eventing
Copy link
Contributor

Choose a reason for hiding this comment

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

Looks like you can't drop the v1alpha1 for the brokers based on this from the failed upgrade tests:
for: "STDIN": CustomResourceDefinition.apiextensions.k8s.io "brokers.eventing.knative.dev" is invalid: status.storedVersions[0]: Invalid value: "v1alpha1": must appear in spec.versions
Error from server (Invalid): error when applying patch:
Or:
for: "STDIN": CustomResourceDefinition.apiextensions.k8s.io "pingsources.sources.knative.dev" is invalid: status.storedVersions[0]: Invalid value: "v1alpha1": must appear in spec.versions

Copy link
Member

@dprotaso dprotaso Jun 26, 2020

Choose a reason for hiding this comment

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

Yeah this requires the storage migration job to be run before the upgrade

I do this after the upgrade in serving which is technically wrong (we've never dropped a version yet so we didn't catch it)

@vaikas
Copy link
Contributor

vaikas commented Jun 28, 2020

/test pull-knative-eventing-upgrade-tests

@vaikas vaikas mentioned this pull request Jun 28, 2020
@matzew matzew force-pushed the CRD_v1 branch 2 times, most recently from ecb9ced to b69d793 Compare June 29, 2020 11:17
@matzew
Copy link
Member Author

matzew commented Jun 29, 2020

/unhold

@knative-prow-robot knative-prow-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jun 29, 2020
@knative-test-reporter-robot

The following jobs failed:

Test name Triggers Retries
pull-knative-eventing-upgrade-tests 0/3

Failed non-flaky tests preventing automatic retry of pull-knative-eventing-upgrade-tests:

test/upgrade.TestContinuousEventsPropagationWithProber

Signed-off-by: Matthias Wessendorf <mwessend@redhat.com>
@dprotaso
Copy link
Member

lgtm

letting @vaikas do the heavy work

@vaikas
Copy link
Contributor

vaikas commented Jun 29, 2020

/lgtm
/approve

@knative-prow-robot knative-prow-robot added the lgtm Indicates that a PR is ready to be merged. label Jun 29, 2020
@knative-prow-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: matzew, vaikas

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. area/test-and-release Test infrastructure, tests or release cla: yes Indicates the PR's author has signed the CLA. 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.

Switch to CRDs v1
8 participants