diff --git a/http-add-on/README.md b/http-add-on/README.md index dd838b22..c07fb31d 100644 --- a/http-add-on/README.md +++ b/http-add-on/README.md @@ -96,11 +96,17 @@ their default values. | `operator.port` | The port for the operator main server to run on | `8443` | | `operator.adminService` | The name of the [`Service`](https://kubernetes.io/docs/concepts/services-networking/service/) for the operator's admin server | `operator-admin` | | `operator.adminPort` | The port for the operator's admin server to run on | `9090` | +| `operator.nodeSelector` | Node selector for pod scheduling ([docs](https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/)) | `{}` | +| `operator.tolerations` | Tolerations for pod scheduling ([docs](https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/)) | `{}` | +| `operator.affinity` | Affinity for pod scheduling ([docs](https://kubernetes.io/docs/tasks/configure-pod-container/assign-pods-nodes-using-node-affinity/)) | `{}` | | `scaler.service` | The name of the Kubernetes `Service` for the scaler component | `external-scaler` | | `scaler.pullPolicy` | The image pull policy for the scaler component | `Always` | | `scaler.grpcPort` | The port for the scaler's gRPC server. This is the server that KEDA will send scaling requests to. | `9090` | | `scaler.healthPort` | The port for the scaler's health check and admin server | `9091` | | `scaler.pendingRequestsInterceptor` | The number of "target requests" that the external scaler will report to KEDA for the interceptor's scaling metrics. See the [KEDA external scaler documentation](https://keda.sh/docs/2.4/concepts/external-scalers/) for details on target requests. | `200` | +| `scaler.nodeSelector` | Node selector for pod scheduling ([docs](https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/)) | `{}` | +| `scaler.tolerations` | Tolerations for pod scheduling ([docs](https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/)) | `{}` | +| `scaler.affinity` | Affinity for pod scheduling ([docs](https://kubernetes.io/docs/tasks/configure-pod-container/assign-pods-nodes-using-node-affinity/)) | `{}` | | `interceptor.pullPolicy` | The image pull policy for the interceptor component | `Always` | | `interceptor.admin.service` | The name of the Kubernetes `Service` for the interceptor's admin service | `interceptor-admin` | | `interceptor.admin.port` | The port for the interceptor's admin server to run on | `9090` | @@ -120,6 +126,9 @@ their default values. | `interceptor.idleConnTimeout` | The timeout after which any idle connection is closed and removed from the interceptor's in-memory connection pool. | `90s` | | `interceptor.tlsHandshakeTimeout` | The maximum amount of time the interceptor will wait for a TLS handshake. Set to zero to indicate no timeout. | `10s` | | `interceptor.expectContinueTimeout` | Special handling for responses with "Expect: 100-continue" response headers. see https://pkg.go.dev/net/http#Transport under the 'ExpectContinueTimeout' field for more details | `1s` | +| `interceptor.nodeSelector` | Node selector for pod scheduling ([docs](https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/)) | `{}` | +| `interceptor.tolerations` | Tolerations for pod scheduling ([docs](https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/)) | `{}` | +| `interceptor.affinity` | Affinity for pod scheduling ([docs](https://kubernetes.io/docs/tasks/configure-pod-container/assign-pods-nodes-using-node-affinity/)) | `{}` | Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example: diff --git a/http-add-on/templates/deployment-interceptor.yaml b/http-add-on/templates/deployment-interceptor.yaml index e76d5852..48919584 100644 --- a/http-add-on/templates/deployment-interceptor.yaml +++ b/http-add-on/templates/deployment-interceptor.yaml @@ -81,3 +81,15 @@ spec: resources: {{- toYaml .Values.resources | nindent 12 }} terminationGracePeriodSeconds: 10 + {{- with .Values.interceptor.nodeSelector }} + nodeSelector: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.interceptor.affinity }} + affinity: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.interceptor.tolerations }} + tolerations: + {{- toYaml . | nindent 8 }} + {{- end }} diff --git a/http-add-on/templates/deployment-operator.yaml b/http-add-on/templates/deployment-operator.yaml index 12fd1d8d..114deb64 100644 --- a/http-add-on/templates/deployment-operator.yaml +++ b/http-add-on/templates/deployment-operator.yaml @@ -64,3 +64,15 @@ spec: resources: {{- toYaml .Values.resources | nindent 12 }} terminationGracePeriodSeconds: 10 + {{- with .Values.operator.nodeSelector }} + nodeSelector: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.operator.affinity }} + affinity: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.operator.tolerations }} + tolerations: + {{- toYaml . | nindent 8 }} + {{- end }} diff --git a/http-add-on/templates/deployment-scaler.yaml b/http-add-on/templates/deployment-scaler.yaml index fcfa424a..18c01405 100644 --- a/http-add-on/templates/deployment-scaler.yaml +++ b/http-add-on/templates/deployment-scaler.yaml @@ -65,3 +65,15 @@ spec: resources: {{- toYaml .Values.resources | nindent 12 }} terminationGracePeriodSeconds: 10 + {{- with .Values.scaler.nodeSelector }} + nodeSelector: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.scaler.affinity }} + affinity: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.scaler.tolerations }} + tolerations: + {{- toYaml . | nindent 8 }} + {{- end }} diff --git a/http-add-on/values.yaml b/http-add-on/values.yaml index 339ef81c..d5c09cc1 100644 --- a/http-add-on/values.yaml +++ b/http-add-on/values.yaml @@ -20,6 +20,9 @@ operator: port: 8443 adminService: operator-admin adminPort: 9090 + nodeSelector: {} + tolerations: [] + affinity: {} scaler: service: external-scaler @@ -27,6 +30,9 @@ scaler: grpcPort: 9090 healthPort: 9091 pendingRequestsInterceptor: 200 + nodeSelector: {} + tolerations: [] + affinity: {} interceptor: # the image pull policy of the interceptor @@ -103,6 +109,10 @@ interceptor: # under the 'ExpectContinueTimeout' field for more details expectContinueTimeout: 1s + nodeSelector: {} + tolerations: [] + affinity: {} + # configuration for the images to use for each component images: # tag is the image tag to use for all images.