-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow scheduling rules for operator pod (#328)
This adds standard scheduling rules for the operator pod. The following options are now available through the helm chart to control where the operator pod is scheduled: - nodeSelector - affinity - tolerations - priorityClassName OLM deployment won't be able to pick any of these options.
- Loading branch information
spilchen
authored
Jan 30, 2023
1 parent
72cb9c5
commit 3d01530
Showing
21 changed files
with
465 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
kind: Added | ||
body: Allow scheduling rules for operator pod | ||
time: 2023-01-30T09:43:33.307685455-04:00 | ||
custom: | ||
Issue: "328" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
61 changes: 61 additions & 0 deletions
61
helm-charts/verticadb-operator/tests/pod-schedule_test.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
suite: test that control where the operator is scheduled | ||
templates: | ||
- verticadb-operator-controller-manager-deployment.yaml | ||
tests: | ||
- it: we can specify a node selector | ||
set: | ||
nodeSelector: | ||
region: us-east | ||
usage: operator | ||
asserts: | ||
- equal: | ||
path: spec.template.spec.nodeSelector | ||
value: | ||
region: us-east | ||
usage: operator | ||
- it: we can specify affinity and anti-affinity rules | ||
set: | ||
affinity: | ||
podAntiAffinity: | ||
requiredDuringSchedulingIgnoredDuringExecution: | ||
- labelSelector: | ||
matchExpressions: | ||
- key: app.kubernetes.io/name | ||
operator: In | ||
values: | ||
- vertica | ||
topologyKey: "kubernetes.io/hostname" | ||
asserts: | ||
- equal: | ||
path: spec.template.spec.affinity | ||
value: | ||
podAntiAffinity: | ||
requiredDuringSchedulingIgnoredDuringExecution: | ||
- labelSelector: | ||
matchExpressions: | ||
- key: app.kubernetes.io/name | ||
operator: In | ||
values: | ||
- vertica | ||
topologyKey: "kubernetes.io/hostname" | ||
- it: we can specify a priorityClassName | ||
set: | ||
priorityClassName: pri1 | ||
asserts: | ||
- equal: | ||
path: spec.template.spec.priorityClassName | ||
value: pri1 | ||
- it: we can specify a toleration | ||
set: | ||
tolerations: | ||
- key: "example-key" | ||
operator: "Exists" | ||
effect: "NoSchedule" | ||
asserts: | ||
- equal: | ||
path: spec.template.spec.tolerations[0] | ||
value: | ||
key: "example-key" | ||
operator: "Exists" | ||
effect: "NoSchedule" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# (c) Copyright [2021-2022] Micro Focus or one of its affiliates. | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# You may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
apiVersion: scheduling.k8s.io/v1 | ||
kind: PriorityClass | ||
metadata: | ||
name: pri-operator-pod-scheduling | ||
value: 1000000 |
Oops, something went wrong.