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 cluster-scoped related resources for namespaced parents #345
Comments
@sathieu I will try to determine if it would be possible. If children will be still namespaced-scope in the same namespace I think it would be doable |
…cd parents : metacontroller#345 Signed-off-by: ragatzino <antoinebrunetti@gmail.com>
I'm trying this, it's my first pr : #362 |
hi @sathieu , I checked the code, how your |
ah, wait, there is second check in code, need to test it. |
…espace and cluster scoped Signed-off-by: grzesuav <grzesuav@gmail.com>
#363 - @sathieu @Ragatzino after reviewing code I found a bit simpler way, would appreciate feedback. I will add more unit tests, and documentation |
just realized it will be slightly more complicated, as it potential requires API changes, need to review this case |
Thanks for the reply :). Tell us when you need a review or smt. |
there is a related discussion in #370 |
@grzesuav Couldn't proposed PR be changed to be backward compatible? i.e. only specifying namespace when different from parent namespace : {
"related": {
"Pod.v1": {
"resourceInTheParentNamespace": {},
"someOtherNamespace/someResource": {}
}
}
} |
@sathieu and how you denote cluster-scoped resource here ? |
@grzesuav As they work today, i.e without prefix: {
"related": {
"ClusterRoleBinding.rbac.authorization.k8s.io/v1": {
"clusterScopedResource": {}
},
"Pod.v1": {
"resourceInTheParentNamespace": {},
"someOtherNamespace/someResource": {}
}
}
} |
but this is a breaking change - in the proposed PR only the selector is changed, which result in more objects returned as matching. But to create API response, there is In particular, the PR - #362 was just touching a part of whats need to be done, it was just Depending on implementation, lines https://github.com/metacontroller/metacontroller/blob/master/pkg/controller/common/customize/manager.go#L381-L397 should be modified. The issue is there is a I will experiment how it would impact The desired format for me would be {
"related": {
"ClusterRoleBinding.rbac.authorization.k8s.io/v1": {
"clusterScopedResource": {}
},
"Pod.v1": {
"sameNamespace/resourceInTheParentNamespace": {},
"someOtherNamespace/someResource": {}
}
}
} as it is unambigous - you do not need to handle special case to detect if resource is in the same or other namespace (i.e. by parsing if it has |
…ate package Signed-off-by: grzesuav <grzesuav@gmail.com>
…ate package Signed-off-by: grzesuav <grzesuav@gmail.com>
…ate package Signed-off-by: grzesuav <grzesuav@gmail.com>
…ate package Signed-off-by: grzesuav <grzesuav@gmail.com>
…ate package Signed-off-by: grzesuav <grzesuav@gmail.com>
Signed-off-by: grzesuav <grzesuav@gmail.com>
…eparate api package Signed-off-by: grzesuav <grzesuav@gmail.com>
…eparate api package Signed-off-by: grzesuav <grzesuav@gmail.com>
…ckage Signed-off-by: grzesuav <grzesuav@gmail.com>
Signed-off-by: Grzegorz Głąb <grzesuav@gmail.com>
Signed-off-by: Grzegorz Głąb <grzesuav@gmail.com>
Signed-off-by: Grzegorz Głąb <grzesuav@gmail.com>
Signed-off-by: Grzegorz Głąb <grzesuav@gmail.com>
Depends on #496 |
Signed-off-by: Grzegorz Głąb <grzesuav@gmail.com>
Signed-off-by: Grzegorz Głąb <grzesuav@gmail.com>
I'd like to voice support for this proposal. I'd like to use a |
Given an
Ingress
as parent (namespaced), I want to get access to it's parentIngressClass
(cluster-scoped).Some context here and here.
The text was updated successfully, but these errors were encountered: