diff --git a/hack/install-envtest.sh b/hack/install-envtest.sh index d1cf5688b..2fed17ba2 100755 --- a/hack/install-envtest.sh +++ b/hack/install-envtest.sh @@ -32,6 +32,6 @@ version=$(cat ${SCRIPT_ROOT}/go.mod | grep 'k8s.io/kubernetes' | grep -v '=>' | GOPATH=$(go env GOPATH) TEMP_DIR=${TMPDIR-/tmp} -go install sigs.k8s.io/controller-runtime/tools/setup-envtest@latest +go install sigs.k8s.io/controller-runtime/tools/setup-envtest@release-0.15 "${GOPATH}"/bin/setup-envtest use -p env "${version}" > "${TEMP_DIR}/setup-envtest" diff --git a/manifests/install/charts/as-a-second-scheduler/README.md b/manifests/install/charts/as-a-second-scheduler/README.md index a013abe6b..7b10cee65 100644 --- a/manifests/install/charts/as-a-second-scheduler/README.md +++ b/manifests/install/charts/as-a-second-scheduler/README.md @@ -48,8 +48,14 @@ The following table lists the configurable parameters of the as-a-second-schedul | `scheduler.image` | Scheduler image | `registry.k8s.io/scheduler-plugins/kube-scheduler:v0.27.8` | | `scheduler.leaderElect` | Scheduler leaderElection | `false` | | `scheduler.replicaCount` | Scheduler replicaCount | `1` | +| `scheduler.nodeSelector` | Scheduler nodeSelector | `{}` | +| `scheduler.affinity` | Scheduler affinity | `{}` | +| `scheduler.tolerations` | Scheduler tolerations | `[]` | | `controller.name` | Controller name | `scheduler-plugins-controller` | | `controller.image` | Controller image | `registry.k8s.io/scheduler-plugins/controller:v0.27.8` | | `controller.replicaCount` | Controller replicaCount | `1` | +| `controller.nodeSelector` | Controller nodeSelector | `{}` | +| `controller.affinity` | Controller affinity | `{}` | +| `controller.tolerations` | Controller tolerations | `[]` | | `plugins.enabled` | Plugins enabled by default | `["Coscheduling","CapacityScheduling","NodeResourceTopologyMatch", "NodeResourcesAllocatable"]` | | `plugins.disabled` | Plugins disabled by default | `["PrioritySort"]` | diff --git a/manifests/install/charts/as-a-second-scheduler/templates/deployment.yaml b/manifests/install/charts/as-a-second-scheduler/templates/deployment.yaml index 710be9ade..9d7286be3 100644 --- a/manifests/install/charts/as-a-second-scheduler/templates/deployment.yaml +++ b/manifests/install/charts/as-a-second-scheduler/templates/deployment.yaml @@ -20,6 +20,16 @@ spec: - name: scheduler-plugins-controller image: {{ .Values.controller.image }} imagePullPolicy: IfNotPresent + {{- with .Values.controller.nodeSelector }} + nodeSelector: {{- toYaml . | nindent 8}} + {{- end }} + {{- with .Values.controller.affinity }} + affinity: {{- toYaml . | nindent 8}} + {{- end }} + {{- with .Values.controller.tolerations }} + tolerations: {{- toYaml . | nindent 8}} + {{- end }} + --- apiVersion: apps/v1 kind: Deployment @@ -72,3 +82,13 @@ spec: - name: scheduler-config configMap: name: scheduler-config + {{- with .Values.scheduler.nodeSelector }} + nodeSelector: {{- toYaml . | nindent 8}} + {{- end }} + {{- with .Values.scheduler.affinity }} + affinity: {{- toYaml . | nindent 8}} + {{- end }} + {{- with .Values.scheduler.tolerations }} + tolerations: {{- toYaml . | nindent 8}} + {{- end }} + \ No newline at end of file diff --git a/manifests/install/charts/as-a-second-scheduler/values.yaml b/manifests/install/charts/as-a-second-scheduler/values.yaml index 623081b98..9d08c8812 100644 --- a/manifests/install/charts/as-a-second-scheduler/values.yaml +++ b/manifests/install/charts/as-a-second-scheduler/values.yaml @@ -7,11 +7,17 @@ scheduler: image: registry.k8s.io/scheduler-plugins/kube-scheduler:v0.27.8 replicaCount: 1 leaderElect: false + nodeSelector: {} + affinity: {} + tolerations: [] controller: name: scheduler-plugins-controller image: registry.k8s.io/scheduler-plugins/controller:v0.27.8 replicaCount: 1 + nodeSelector: {} + affinity: {} + tolerations: [] # LoadVariationRiskBalancing and TargetLoadPacking are not enabled by default # as they need extra RBAC privileges on metrics.k8s.io.