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 v1 API for KafkaChannel, KafkaSource and KafkaBinding #132

Merged

Conversation

pierDipi
Copy link
Member

@pierDipi pierDipi commented Oct 22, 2020

CRD v1beta1 API is deprecated and will be removed in k8s 1.22.
Similar to knative/eventing#3360.
Webhook API bump in a follow-up.

Proposed Changes

  • Use CRD v1 API for KafkaChannel, KafkaSource and KafkaBinding

Release Note

- 🎁 Add new feature
KafkaChannel CustomResourceDefinition now uses apiextensions.k8s.io/v1 APIs

/cc slinkydeveloper matzew

@google-cla google-cla bot added the cla: yes Indicates the PR's author has signed the CLA. label Oct 22, 2020
@knative-prow-robot knative-prow-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Oct 22, 2020
@codecov
Copy link

codecov bot commented Oct 22, 2020

Codecov Report

Merging #132 (68cffec) into master (e71a1b1) will increase coverage by 0.04%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #132      +/-   ##
==========================================
+ Coverage   75.99%   76.04%   +0.04%     
==========================================
  Files         112      112              
  Lines        4274     4274              
==========================================
+ Hits         3248     3250       +2     
+ Misses        831      829       -2     
  Partials      195      195              
Impacted Files Coverage Δ
...tributed/common/kafka/admin/eventhubcache/cache.go 67.46% <0.00%> (+2.40%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e71a1b1...aea063b. Read the comment docs.

@matzew
Copy link
Contributor

matzew commented Oct 22, 2020

/hold

we need upgrade tests for that

I think @aliok has some reference GH issue for this, what all needs to be done

@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 Oct 22, 2020
@pierDipi pierDipi changed the title Bump KafkaChannel CRD to v1 Use CRD v1 API for KafkaChannel Oct 22, 2020
@pierDipi
Copy link
Member Author

@matzew, would you mind helping me understand why?
To clarify, I'm changing the CRD apiVersion (apiextensions.k8s.io/v1), not adding the KafkaChannel v1.

@matzew
Copy link
Contributor

matzew commented Oct 27, 2020

If we tackle this - can we also tackle the source ?

Does it work when applying the V1 based version on-top of a v1beta version? and than "rolling back from V1 to beta` ?

I think when I did that for "eventing" repo, the tests there were useful

@matzew
Copy link
Contributor

matzew commented Nov 6, 2020

@pierDipi Getting back to this.

We we structure those CRDs, like we have them on "eventing" repo ?

Like:

Can we also have the same lifting for the binding, the source and the distributed channel?

@matzew
Copy link
Contributor

matzew commented Nov 9, 2020

Does that make sense @pierDipi ?

name: kafka-webhook
namespace: knative-eventing
webhook:
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.

@pierDipi
Please only change the CRD to use Kube's v1 ApiExtensions.

Bumping the version of messaging.knative.dev to v1 is a separate work.

Copy link
Member Author

@pierDipi pierDipi Nov 9, 2020

Choose a reason for hiding this comment

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

This refers to the conversion review version.

Copy link
Member Author

Choose a reason for hiding this comment

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

From: https://kubernetes.io/docs/tasks/extend-kubernetes/custom-resources/custom-resource-definition-versioning/

# conversionReviewVersions indicates what ConversionReview versions are understood/preferred by the webhook.
# The first version in the list understood by the API server is sent to the webhook.
# The webhook must respond with a ConversionReview object in the same version it received.

Copy link
Member

Choose a reason for hiding this comment

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

Ok, so, not related to KafkaChannel's version (messaging.knative.dev)?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, it's unrelated, see https://github.com/knative/eventing/blob/master/config/core/resources/eventtype.yaml, EventType is in v1alpha1 and v1beta1 and the conversionReviewVersions is set to [ "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.

ha, ok.

Copy link
Contributor

Choose a reason for hiding this comment

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

Isn't that the conversion of the CRD api itself ?

Copy link
Member Author

Choose a reason for hiding this comment

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

@pierDipi
Copy link
Member Author

pierDipi commented Nov 9, 2020

@matzew it makes sense to me.

@matzew
Copy link
Contributor

matzew commented Nov 20, 2020

/retest

@matzew
Copy link
Contributor

matzew commented Nov 21, 2020

@pierDipi I think this needs a rebase

@knative-prow-robot knative-prow-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Nov 21, 2020
Signed-off-by: Pierangelo Di Pilato <pierangelodipilato@gmail.com>
Signed-off-by: Pierangelo Di Pilato <pierangelodipilato@gmail.com>
Signed-off-by: Pierangelo Di Pilato <pierangelodipilato@gmail.com>
Signed-off-by: Pierangelo Di Pilato <pierangelodipilato@gmail.com>
@knative-prow-robot knative-prow-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Nov 23, 2020
@pierDipi
Copy link
Member Author

Flaky, I opened an issue: #218
/retest

Signed-off-by: Pierangelo Di Pilato <pierangelodipilato@gmail.com>
@pierDipi pierDipi changed the title Use CRD v1 API for KafkaChannel Use CRD v1 API for KafkaChannel, KafkaSource and KafkaBinding Nov 23, 2020
@matzew
Copy link
Contributor

matzew commented Nov 23, 2020

VEry cool!

@travis-minke-sap
Copy link
Contributor

Seem fine to me! I had the same questions regarding conversionReviewVersions and so learned something from the conversation above ; )

@matzew
Copy link
Contributor

matzew commented Nov 23, 2020

/lgtm

/assign for @aliok to approve and unhold

@knative-prow-robot knative-prow-robot added the lgtm Indicates that a PR is ready to be merged. label Nov 23, 2020
@aliok
Copy link
Member

aliok commented Nov 25, 2020

/lgtm
/approve

@knative-prow-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: aliok, pierDipi

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

@knative-prow-robot knative-prow-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Nov 25, 2020
@pierDipi
Copy link
Member Author

/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 Nov 25, 2020
@knative-prow-robot knative-prow-robot merged commit 700349f into knative-extensions:master Nov 25, 2020
matzew pushed a commit to matzew/eventing-kafka that referenced this pull request Apr 8, 2021
…xtensions#132)

* Channel upgrade tests structure and smoke test

* Code reformat

* Executing shell scripts to install eventing core

* Eventing Core installs well

* Fix add_trap function

* Install latest release and HEAD of consolidated channel

* Install channel from release works

* Format code

* Default a KafkaChannel in upgrade tests

* Continual tests

* Update configmap instead of patch

* Removal of strict mode from e2e-common as it fails current code :-(

* Reformatting

* Invoke upgrade tests while testing consolidated

* Proper invocation od e2e-upgrade-tests

* Move strict mode after souring the library

* Move strict mode lower

* Reference the eventing-core wathola test images

* Run post-scripts

* Move strict mode lower

* Remove strict mode from scripts :-/

* Raise unavailable period to report to 40 sec

* Shorter name of main test method

* Commenting out run_postinstall_jobs to pass mt-source job

  See reported issue: knative-extensions#495

* Removing temporal invocation of upgrade tests
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. cla: yes Indicates the PR's author has signed the CLA. 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.

None yet

5 participants