Similar to how commonAnnotations works, it would bee useful to be able to apply a common set of nodeSelectors and tolerations that apply to all podSpecs referenced by a kustomization.yaml.
This would allow running an entire application, defined by the kustomization.yaml, on dedicated hardware. So if I wanted to isolate production hardware from staging hardware, such a feature would enable that with ease.
The current workaround is perhaps to patch each podSpec individually.
We have a similar desire and are planning on writing external transformer plugins to set common nodeAffinity and tolerations for all podSpecs. nodeSelectors would be pretty trivial to include as well. If there is interest in this I can work on either opensourcing the external plugins we create and/or incorporating them as builtin transformer plugins.
@sidps We actually decided today to use the new extended patch system that was merged in #1355 instead of a plugin to accomplish what we need with nodeAffinity maybe that would work for your use case as well.
Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.
If this issue is safe to close now please do so with /close.
Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle stale
We are using the patch system for now, as a workaround.
Was a decision made around whether the commonNodeSelectors and commonTolerations might be added in the future? This can be done via patching of course, but common* seems general-purpose and straightforward, and my project would use them if it were available.
Most helpful comment
@sidps We actually decided today to use the new extended patch system that was merged in #1355 instead of a plugin to accomplish what we need with nodeAffinity maybe that would work for your use case as well.