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
Proposal: Generics for CustomValidator & CustomDefaulter #2675
can probably be inferred with more type safety (right now there's nothing ensures a & b are handlers of the same type in WithDefaulter(a).WithDefaulter(b)?). e.g.
can probably be inferred with more type safety (right now there's nothing ensures a & b are handlers of the same type in WithDefaulter(a).WithDefaulter(b)?).
/kind proposal
/kind feature
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.
@ahmetb are you sure this is possible? My understanding is that it isn't due to golang/go#49085, the WebhookBuilder would only be able to support one type. I'd love to be wrong on this though.
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.
Currently also running into this and its annoying. I just had a look at all of this and I think this is totally possible, it is just that the typing changes would need to go up until including the webhook builder. Since the webhook builder conceptionally represents a webhook for one type, that seems fine
+1 Makes sense to me. We might have to add new builder methods to keep supporting the Custom* interfaces until they are removed but that's fine for me (I think that depends on if we use the generic type parameter for For or not).
We could also maybe add a type parameter and only use it for defaulter/validator and once the Custom* interfaces are gone we also use it in For
Activity
k8s-ci-robot commentedon Feb 7, 2024
@ahmetb: The label(s)
kind/proposalcannot be applied, because the repository doesn't have them.Details
In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.
alvaroaleman commentedon Feb 8, 2024
@ahmetb are you sure this is possible? My understanding is that it isn't due to golang/go#49085, the
WebhookBuilderwould only be able to support one type. I'd love to be wrong on this though.ahmetb commentedon Feb 9, 2024
I will give it a shot. I hit that in porting go-linq to generics as well.
k8s-triage-robot commentedon May 9, 2024
The Kubernetes project currently lacks enough contributors to adequately respond to all issues.
This bot triages un-triaged issues according to the following rules:
lifecycle/staleis appliedlifecycle/stalewas applied,lifecycle/rottenis appliedlifecycle/rottenwas applied, the issue is closedYou can:
/remove-lifecycle stale/closePlease send feedback to sig-contributor-experience at kubernetes/community.
/lifecycle stale
k8s-triage-robot commentedon Jun 8, 2024
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues.
This bot triages un-triaged issues according to the following rules:
lifecycle/staleis appliedlifecycle/stalewas applied,lifecycle/rottenis appliedlifecycle/rottenwas applied, the issue is closedYou can:
/remove-lifecycle rotten/closePlease send feedback to sig-contributor-experience at kubernetes/community.
/lifecycle rotten
sbueringer commentedon Jun 18, 2024
/remove-lifecycle rotten
k8s-triage-robot commentedon Sep 16, 2024
The Kubernetes project currently lacks enough contributors to adequately respond to all issues.
This bot triages un-triaged issues according to the following rules:
lifecycle/staleis appliedlifecycle/stalewas applied,lifecycle/rottenis appliedlifecycle/rottenwas applied, the issue is closedYou can:
/remove-lifecycle stale/closePlease send feedback to sig-contributor-experience at kubernetes/community.
/lifecycle stale
k8s-triage-robot commentedon Oct 16, 2024
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues.
This bot triages un-triaged issues according to the following rules:
lifecycle/staleis appliedlifecycle/stalewas applied,lifecycle/rottenis appliedlifecycle/rottenwas applied, the issue is closedYou can:
/remove-lifecycle rotten/closePlease send feedback to sig-contributor-experience at kubernetes/community.
/lifecycle rotten
k8s-triage-robot commentedon Nov 15, 2024
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.
This bot triages issues according to the following rules:
lifecycle/staleis appliedlifecycle/stalewas applied,lifecycle/rottenis appliedlifecycle/rottenwas applied, the issue is closedYou can:
/reopen/remove-lifecycle rottenPlease send feedback to sig-contributor-experience at kubernetes/community.
/close not-planned
k8s-ci-robot commentedon Nov 15, 2024
@k8s-triage-robot: Closing this issue, marking it as "Not Planned".
Details
In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.
alvaroaleman commentedon Oct 16, 2025
/reopen
/lifecycle frozen
Currently also running into this and its annoying. I just had a look at all of this and I think this is totally possible, it is just that the typing changes would need to go up until including the webhook builder. Since the webhook builder conceptionally represents a webhook for one type, that seems fine
sbueringer commentedon Oct 20, 2025
+1 Makes sense to me. We might have to add new builder methods to keep supporting the Custom* interfaces until they are removed but that's fine for me (I think that depends on if we use the generic type parameter for For or not).
We could also maybe add a type parameter and only use it for defaulter/validator and once the Custom* interfaces are gone we also use it in For