-
Notifications
You must be signed in to change notification settings - Fork 507
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
allow namespace-scoped parametersRef #543
allow namespace-scoped parametersRef #543
Conversation
8c7a057
to
c7b00fa
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.
Thanks for your work on this @hbagdi! This all matches up with the KEP well, just one tiny nit about defaulting but otherwise LGTM.
c7b00fa
to
f259f11
Compare
This patch adds a namespace field to the parametersRef reference. This allows cluster-scoped GatewayClass resource to reference a namespaced-scoped parameters resource. This is in-line with upstream KEP 2365: https://github.com/kubernetes/enhancements/blob/master/keps/prod-readiness/sig-network/2365.yaml Why is it done the way it is done? - Namespace field was not added to LocalObjectReference because that type is referenced in a lot of places. We don't want to add in an optional namespace field in all these places and increase security issues with cross-namespace references. - ObjectReference was not used because upstream discourages its use: https://pkg.go.dev/k8s.io/api/core/v1#ObjectReference. Instead, a new type was introduced as per upstream's guidance. - A new "Cluster" field was added as advised upstream: kubernetes/enhancements#2366 (comment)
f259f11
to
266d0da
Compare
Thanks! /lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: hbagdi, robscott 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 |
This patch adds a namespace field to the parametersRef reference.
This allows cluster-scoped GatewayClass resource to reference a
namespaced-scoped parameters resource.
This is in-line with upstream KEP 2365:
https://github.com/kubernetes/enhancements/blob/master/keps/prod-readiness/sig-network/2365.yaml
Why is it done the way it is done?
type is referenced in a lot of places. We don't want to add in an
optional namespace field in all these places and increase security
issues with cross-namespace references.
https://pkg.go.dev/k8s.io/api/core/v1#ObjectReference. Instead, a new type was
introduced as per upstream's guidance.
Adding KEP 2365: IngressClass Namespaced Params kubernetes/enhancements#2366 (comment)
What type of PR is this?
/kind feature
What this PR does / why we need it:
This patch adds a namespace field to the parametersRef reference.
This allows cluster-scoped GatewayClass resource to reference a
namespaced-scoped parameters resource.
Which issue(s) this PR fixes:
Fixes #524
Close #523
Does this PR introduce a user-facing change?: