-
Notifications
You must be signed in to change notification settings - Fork 892
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
karmada-webhook
: Fix panic when validating ResourceInterpreterWebhookConfiguration with unspecified service port
#5960
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## master #5960 +/- ##
=======================================
Coverage 48.17% 48.17%
=======================================
Files 664 664
Lines 54799 54811 +12
=======================================
+ Hits 26399 26407 +8
- Misses 26684 26688 +4
Partials 1716 1716
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
e34b026
to
342a7b6
Compare
ec4e596
to
c3fedf0
Compare
thanks |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/assign
Please share the panic logs, I want to know where the panic is. |
I reproduced it on my side:
|
c3fedf0
to
0e22d2e
Compare
Yes, we quite specified the port. Like this: apiVersion: config.karmada.io/v1alpha1
kind: ResourceInterpreterWebhookConfiguration
metadata:
name: workload-interpretreplica-retain
webhooks:
- name: workload-interpreter-webhook
rules:
- apiGroups:
- workload.example.io
apiVersions:
- v1
kinds:
- Workload
operations:
- InterpretReplica
- Retain
clientConfig:
service:
name: workload-interpreter-webhook
namespace: karmada-system
path: /interpret-workload
port: 443
interpreterContextVersions:
- v1alpha1
timeoutSeconds: 3 |
Thank you @lxtywypc for the clarification. So, this patch will not affect your use case. |
/retile |
/retitle |
karmada-webhook
: Fix panic when validating ResourceInterpreterWebhookConfiguration with unspecified service port
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's fix this with this temporary solution and backport all affected releases.
In the long term, we might need to introduce a mutating webhook for ResourceInterpreterWebhook
.
…ooks[*].clientConfig.service.port is nil Signed-off-by: changzhen <changzhen5@huawei.com>
0e22d2e
to
262fcb3
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
/approve
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: RainbowMango 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 |
What type of PR is this?
/kind bug
What this PR does / why we need it:
When I apply a ResourceInterpreterWebhookConfiguration's
.webhooks[*].clientConfig.service.port
is nil, it report panic in thekarmada-webhook
component.Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
Does this PR introduce a user-facing change?: