Skip to content

Commit

Permalink
Schedule etcd-main and kube-apiserver to high-cpu worker pool
Browse files Browse the repository at this point in the history
  • Loading branch information
timebertt committed Sep 10, 2023
1 parent f05f380 commit 2c71755
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 0 deletions.
19 changes: 19 additions & 0 deletions webhosting-operator/config/policy/controlplane/etcd-main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,22 @@ spec:
limits:
cpu: 12000m
memory: 12Gi
# schedule etcd-main on high-cpu worker pool for stable performance
- name: add-scheduling-constraints
match:
any:
- resources:
kinds:
- Pod
selector:
matchLabels:
instance: etcd-main
name: etcd
mutate:
patchesJson6902: |-
- op: add
path: "/spec/tolerations/-"
value: {"key":"high-cpu","operator":"Equal","value":"true","effect":"NoSchedule"}
- op: add
path: "/spec/affinity/nodeAffinity/requiredDuringSchedulingIgnoredDuringExecution/nodeSelectorTerms/-"
value: {"matchExpressions": [{"key":"high-cpu","operator":"In","values":["true"]}]}
19 changes: 19 additions & 0 deletions webhosting-operator/config/policy/controlplane/kube-apiserver.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,3 +53,22 @@ spec:
limits:
cpu: 12000m
memory: 12Gi
# schedule kube-apiserver on high-cpu worker pool for stable performance
- name: add-scheduling-constraints
match:
any:
- resources:
kinds:
- Pod
selector:
matchLabels:
app: kubernetes
role: apiserver
mutate:
patchesJson6902: |-
- op: add
path: "/spec/tolerations/-"
value: {"key":"high-cpu","operator":"Equal","value":"true","effect":"NoSchedule"}
- op: add
path: "/spec/affinity/nodeAffinity/requiredDuringSchedulingIgnoredDuringExecution/nodeSelectorTerms/-"
value: {"matchExpressions": [{"key":"high-cpu","operator":"In","values":["true"]}]}

0 comments on commit 2c71755

Please sign in to comment.