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

Fix Kafka topic creation bug due to recent upgrade of AdmissionReview version #796

Merged
merged 5 commits into from Apr 19, 2022

Conversation

panyuenlau
Copy link
Member

@panyuenlau panyuenlau commented Apr 15, 2022

Q A
Bug fix? yes
New feature? no
API breaks? no
Deprecations? no
License Apache 2.0

What's in this PR?

Why?

Kind and APIVersion are not required for "admission.k8s.io/v1beta1" requests but required for "admission.k8s.io/v1", without the necessary fields, the API server rejects the requests with an InternalError, for example:

Error from server (InternalError): error when creating "STDIN": Internal error occurred: failed calling webhook "kafkatopics.kafka.banzaicloud.io": expected webhook response of admission.k8s.io/v1, Kind=AdmissionReview, got /, Kind=

Additional context

In #789 we upgraded the AdmissionReview from v1beta1 to v1, which causes the topic creation to fail. With the fix, kafka topics are created successfully

Checklist

  • Implementation tested
  • Error handling code meets the guideline
  • Logging code meets the guideline
  • User guide and development docs updated (if needed)

@panyuenlau panyuenlau requested a review from a team as a code owner April 15, 2022 21:56
stoader
stoader previously approved these changes Apr 16, 2022
pkg/webhook/request.go Outdated Show resolved Hide resolved
@stoader stoader merged commit cf1cdc4 into banzaicloud:master Apr 19, 2022
@panyuenlau panyuenlau deleted the fix-admission-review-error branch April 19, 2022 12:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants