knative / serving-operator

DEPRECATED: Development continues in https://github.com/knative/operator/
Apache License 2.0
39 stars 48 forks source link

Operations: Please allow setting nodeSelector, tolerations, and affinity on all Pods #386

Closed AceHack closed 4 years ago

AceHack commented 4 years ago

Most companies with complex enough kubernetes deployments that have multiple different node groups require some sort of topology selection so pods will run on the correct group of nodes. Please allow setting nodeSelector, tolerations, and affinity on all Pods to accomplish this. This includes adding it to any CRDs that create pods so these values are settable.

https://kubernetes.io/docs/concepts/configuration/assign-pod-node/ https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/

See below for example:

apiVersion: v1
kind: Pod
metadata:
  name: sample
spec:
  nodeSelector:
    disktype: sad
  tolerations:
  - key: "example-key"
    operator: "Exists"
    effect: "NoSchedule"
  affinity:
    nodeAffinity:
      preferredDuringSchedulingIgnoredDuringExecution:
      - weight: 1
        preference:
          matchExpressions:
          - key: another-node-label-key
            operator: In
            values:
            - another-node-label-value

Related Feature Request: https://github.com/knative/eventing/issues/2883

evankanderson commented 4 years ago

We're going to track this in https://github.com/knative-sandbox/operator/issues/5 and address it comprehensively rather than on a per-repo basis.

/close

knative-prow-robot commented 4 years ago

@evankanderson: Closing this issue.

In response to [this](https://github.com/knative/serving-operator/issues/386#issuecomment-610510432): >We're going to track this in https://github.com/knative-sandbox/operator/issues/5 and address it comprehensively rather than on a per-repo basis. > >/close Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.