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
Add namespace attribute on IngressRouteTCP service #6085
Conversation
13365b7
to
ea89810
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
Cross namespace referencing is discouraged due to fishing, and security/accountability reasons. Is there a use case where an IngressRouteTCP could not be created in the target namespace? Also, this does not take into account that the target namespace may not be watched/allowed via RBAC, and the informers may not be up to date with the endpoints... |
There is a long dicussion in Kubernetes tracker about this if you want to deep dive the subject: kubernetes/kubernetes#17088 . Nginx usage for solving this is interesting though: they have the concept of "merged Ingress": https://github.com/nginxinc/kubernetes-ingress/tree/master/examples-of-custom-resources/cross-namespace-configuration . |
I think that if this was enabled by a feature flag, it would be fine.
It would keep the current behavior, and allow the defaults to be secure, and allow users to allow references if required. This would require users to explicitly allow cross references, and would be unlikely to complain of the risks of enabling it explicitly. This could be implemented to the ingressRoute and ingressRouteTCP crds IMO if that feature flag were implemented. |
The namespace is already available for the services in IngressRoute, so we cannot introduce the option with the expected behavior without breaking. |
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
ea89810
to
fd6b4d4
Compare
pkg/provider/kubernetes/crd/fixtures/tcp/with_different_services_ns.yml
Outdated
Show resolved
Hide resolved
pkg/provider/kubernetes/crd/fixtures/tcp/with_different_services_ns.yml
Outdated
Show resolved
Hide resolved
LGTM after formatting fix. |
9380c7e
to
4df7b1d
Compare
What does this PR do?
Add a namespace attribute on
IngressRouteTCP
service.Motivation
Allow to specify a namespace to reference a Kubernetes service from
IngressRouteTCP
.More