Handle namespaced ExtraResources properly#537
Handle namespaced ExtraResources properly#537bobh66 merged 2 commits intocrossplane-contrib:mainfrom
Conversation
|
Thank you very much for creating this PR. Do you happen to have an approximate release timeline for this change? We would greatly appreciate it, as we are depending on this update. |
adamwg
left a comment
There was a problem hiding this comment.
One thought on future-proofing, but no objection to merging this as-is either. Not sure if I'm an approver on this repo.
| requirements.Resources[k] = v.ToResourceSelector() | ||
| } else { | ||
| requirements.ExtraResources[k] = v.ToResourceSelector() //nolint:staticcheck // need to support Crossplane v1 | ||
| } |
There was a problem hiding this comment.
Would there be any harm in adding all required resources to Resources, but additionally including cluster-scoped resources in ExtraResources? I.e.:
| } | |
| requirements.Resources[k] = v.ToResourceSelector() | |
| if v.Namespace == "" { | |
| requirements.ExtraResources[k] = v.ToResourceSelector() //nolint:staticcheck // need to support Crossplane v1 | |
| } |
This would future-proof against ExtraResources support being dropped in some future Crossplane release.
There was a problem hiding this comment.
I did consider that, but I was afraid (maybe unnecessarily) that the GRPC message might get too big if the resource request was duplicated. But maybe that's not possible given the way the resource responses are processed. I'll take a quick look and probably just accept the suggestion.
|
Thanks for working on this, Would be great to get this rolled out as blocking some of our configuration package development |
|
@sergenyalcin, @turkenf, @negz any chances you can approve this? We kinda rely on this also and have to use additional function as a workaround. |
Signed-off-by: Bob Haddleton <bob.haddleton@nokia.com>
Signed-off-by: Bob Haddleton <bob.haddleton@nokia.com>
b95823e to
1b443e8
Compare
ezgidemirel
left a comment
There was a problem hiding this comment.
Thanks @bobh66 for the PR, LGTM
Description of your changes
Use
requirements.Resourcesfor namespacedExtraResources.Fixes #483
I have: