-
-
Notifications
You must be signed in to change notification settings - Fork 319
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
Adds ability to elide namespace on trigger_owners #1383
base: main
Are you sure you want to change the base?
Adds ability to elide namespace on trigger_owners #1383
Conversation
a6957e5
to
7a9b76d
Compare
Signed-off-by: Jess Bodzo <[email protected]>
7a9b76d
to
c308644
Compare
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #1383 +/- ##
=======================================
- Coverage 72.1% 72.0% -0.0%
=======================================
Files 75 75
Lines 6458 6436 -22
=======================================
- Hits 4651 4633 -18
+ Misses 1807 1803 -4
|
Hey, thanks for this. This sounds like a bug if it's not working. Naming wise this feels slightly odd. The restriction that an owner must be in the same namespace (or cluster-scoped) is a Kubernetes requirement, owner references have these docs:
So if this isn't working, then it's us failing to identify the scope of the resource, rather than exposing a bypass bool. I think we might be able to do this by inspecting |
Thank you for the thoughtful feedback! I will carve some time out this week to review and take a stab at the requested changes. |
I spent some time reviewing the crate to try and understand. Thanks in advance for any pointers and feedback. Is this about right?
Is it your recommendation, @clux, that we attempt to bring that
It is much nicer! Any pointers on adding the |
Hey, yes, in essence this is what I am proposing! Although it might amount to doing similar things to the linked PR first. The problem with using the There were some issues that I forget now because it was a long discussion on the PR, so will have to refamiliarise myself a bit, but I think the core thing is still necessary in some form to solve a bunch of related issues - and it also looks like it is necessary to correctly solve this. |
Update
trigger_owners
to enable namespace erasure on theObjectRef
constructed for the owner.Motivation
trigger_owners
assumes the child's owner is scoped to the same namespace as the child, but this assumption breaks when the owner object is global (not namespace scoped).Solution
An additional parameter is introduced to enable namespace elision when
owner_inherits_namespace
is set to false, otherwise defaulting to the namespace of the child's meta ref.I am open to more elegant approaches, but I do not see a way to avoid adding the extra parameter without client calls about the owner to infer if it is namespaced or not. Did I miss a better way?