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

nodeSelector or affinity to run pods scans and tolerations #301

Open
adonaicosta opened this issue Jun 27, 2024 · 1 comment
Open

nodeSelector or affinity to run pods scans and tolerations #301

adonaicosta opened this issue Jun 27, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@adonaicosta
Copy link

Feature Description

Need to run scans in specific node pool and set tolerations when required

What alternatives have you considered?

In openshift you can set annotation in namespace zora-system, e.g.

oc annotate namespace zora-system 'scheduler.alpha.kubernetes.io/defaultTolerations'='[{"value": "reserved", "effect": "NoSchedule", "key": "infra"},{"value": "reserved", "effect": "NoExecute", "key": "infra"}]'

oc patch namespace zora-system -p '{"metadata":{"annotations":{"openshift.io/node-selector":"env=infra"}}

But vanilla or cloud kubernetes is not possible

@adonaicosta adonaicosta added the enhancement New feature or request label Jun 27, 2024
@hmizael
Copy link
Contributor

hmizael commented Jan 10, 2025

In Kubernetes it is also possible to:

apiVersion: v1
kind: Namespace
metadata:
  name: apps-that-need-nodes-exclusively
  annotations:
    scheduler.alpha.kubernetes.io/node-selector: name-of-node-selector
    scheduler.alpha.kubernetes.io/defaultTolerations: '[{"operator": "Exists", "effect": "NoSchedule", "key": "dedicated-node"}]'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants