Add scheduling parameters for ks-core chart

Signed-off-by: pixiake <guofeng@yunify.com>
This commit is contained in:
pixiake
2021-09-28 18:18:43 +08:00
parent 09ef175e90
commit 1bd8ede93d
4 changed files with 25 additions and 67 deletions

View File

@@ -85,29 +85,14 @@ spec:
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.affinity }}
affinity:
nodeAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- weight: 100
preference:
matchExpressions:
- key: node-role.kubernetes.io/master
operator: In
values:
- ""
{{- if gt .Values.replicaCount 1.0 }}
podAntiAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- topologyKey: kubernetes.io/hostname
labelSelector:
matchExpressions:
- key: app
operator: In
values:
- ks-controller-manager
namespaces:
- {{ .Release.Namespace }}
{{- end }}
{{- toYaml . | nindent 8 }}
{{- end }}
---