Skip to content
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

Support for commonNodeSelectors and commonTolerations #1358

Closed
sidps opened this issue Jul 16, 2019 · 7 comments
Closed

Support for commonNodeSelectors and commonTolerations #1358

sidps opened this issue Jul 16, 2019 · 7 comments
Labels
lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale.

Comments

@sidps
Copy link

sidps commented Jul 16, 2019

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.

@richardmarshall
Copy link
Contributor

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.

@richardmarshall
Copy link
Contributor

@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.

@fejta-bot
Copy link

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

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Oct 17, 2019
@sidps
Copy link
Author

sidps commented Oct 18, 2019

We are using the patch system for now, as a workaround.

@sidps sidps closed this as completed Oct 18, 2019
@mattmceuen
Copy link

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.

@realshuting
Copy link

Is there a way to change the default patch strategy from replace to merge for tolerations?

My use case is to add to tolerations, the following patchesStrategicMerge does not seem to work for me:

        tolerations:
        - key: "node-role.kubernetes.io/test"
          effect: "NoSchedule"
          operator: "Exists"
          $patch: merge

@Shell32-Natsu
Copy link
Contributor

@realshuting #3265 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale.
Projects
None yet
Development

No branches or pull requests

7 participants