You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
admission.Decoder.Decode is panicking after version bump #2695
Add constructors for webhook/conversion, remove webhook/admission.GetDecoder() (https://github.com/kubernetes-sigs/controller-runtime/pull/2144)
There are two set of changes related to the webhooks and how they're exposed. For users using the Manager, there should be minimal to no required changes.
webhook/admission/Webhook.GetDecoder() method has been removed, it was unused before and relied on runtime dependency injection.
webhook/conversion.Webhook struct has been un-exported. Users should use webhook/conversion.NewWebhookHandler instead.
pkg/webhook/admission:
Use Result.Message instead of Result.Reason (https://github.com/kubernetes-sigs/controller-runtime/pull/1539)
Validator and CustomValidator interfaces have been modified to allow returning warnings (https://github.com/kubernetes-sigs/controller-runtime/pull/2014)
Not sure if you are running into issues with this or something involved with the admission.NewDecoder. Can you provide a little more clarity with more information beyond the snippet?
I ran into the same issue, and I believe the relevant change is actually #2134
The decoder is no longer automatically injected into the webhook handler. You need to provide it yourself when you instantiate PodMut with admission.NewDecoder(mgr.GetScheme()).
Reacted by Stefan Büringer, S. M. Mahmudul Haque and Andrejs Ponatovskis
Activity
mahmud2011 commentedon Feb 22, 2024
/kind support
troy0820 commentedon Feb 23, 2024
https://github.com/kubernetes-sigs/controller-runtime/releases/tag/v0.15.0 shows that
Not sure if you are running into issues with this or something involved with the
admission.NewDecoder. Can you provide a little more clarity with more information beyond the snippet?sbueringer commentedon Mar 23, 2024
@mahmud2011 Please provide more of the stacktrace (at least from:
pm.decoder.Decode(req, pod)). You can censor file paths if necessaryantoninbas commentedon Mar 27, 2024
I ran into the same issue, and I believe the relevant change is actually #2134
The
decoderis no longer automatically injected into the webhook handler. You need to provide it yourself when you instantiatePodMutwithadmission.NewDecoder(mgr.GetScheme()).antoninbas commentedon Mar 27, 2024
Providing a full stack trace in case it is still needed, but my analysis above should be correct hopefully:
sbueringer commentedon Mar 27, 2024
Thx, agree. This is the most likely cause
vincepri commentedon Mar 27, 2024
/assign
vincepri commentedon Mar 27, 2024
/kind bug
[Multicluster] Fix cache options for controller Manager (#6150)