Skip to content
This repository has been archived by the owner on Sep 21, 2021. It is now read-only.

Commit

Permalink
Helm chart improvements (#927)
Browse files Browse the repository at this point in the history
* Added sample values in comments.

* Added affinity and improved tolerations.
  • Loading branch information
axozoid authored and diemol committed Apr 7, 2019
1 parent 3a3458b commit 6c20e0d
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 12 deletions.
11 changes: 6 additions & 5 deletions charts/zalenium/templates/_pod-template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -158,11 +158,12 @@ spec:
nodeSelector:
{{ .Values.nodeSelector.key }}: {{ .Values.nodeSelector.value | quote }}
{{- end }}
{{- if .Values.tolerations.enabled }}
{{- if .Values.tolerations }}
tolerations:
- key: {{ .Values.tolerations.key }}
operator: {{ .Values.tolerations.operator }}
value: {{ .Values.tolerations.value | quote }}
effect: {{ .Values.tolerations.effect }}
{{ toYaml .Values.tolerations | indent 4 }}
{{- end }}
{{- if .Values.affinity }}
affinity:
{{ toYaml .Values.affinity | indent 4 }}
{{- end -}}
{{- end }}
43 changes: 36 additions & 7 deletions charts/zalenium/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ hub:
desiredContainers: 2
maxDockerSeleniumContainers: 10
videoRecordingEnabled: true
# the limits/requests below are for Selenium pods (containers)
cpuRequest: 250m
cpuLimit: 1000m
memRequest: 500Mi
Expand Down Expand Up @@ -176,10 +177,38 @@ nodeSelector:
## key: test
## value: test

tolerations:
enabled: false
## Set tolerations to run zalenium hub on nodes with taints
## key: test
## operator: Equal
## value: test
## effect: NoSchedule
# Allow pods to run on nodes with taints
# https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/
#
# tolerations:
# - key: "<key-name>"
# operator: "Equal"
# value: "<key-value>"
# effect: "NoSchedule"

# More flexible way to manage pods' allocation
# https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity
#
# affinity:
# # soft preference to go to dedicated nodes
# nodeAffinity:
# preferredDuringSchedulingIgnoredDuringExecution:
# - weight: 100
# preference:
# matchExpressions:
# - key: <key-name>
# operator: In
# values:
# - <key-value>
# # prefer not to start the pod on a node that's having another pod with specific labels
# podAntiAffinity:
# preferredDuringSchedulingIgnoredDuringExecution:
# - weight: 100
# podAffinityTerm:
# labelSelector:
# matchExpressions:
# - key: <key-name>
# operator: In
# values:
# - <key-value>
# topologyKey: "kubernetes.io/hostname"

0 comments on commit 6c20e0d

Please sign in to comment.