Skip to content

Commit 4e1f8e4

Browse files
authored
feat: add node affinity to Helm chart for improved pod scheduling (#59)
* feat: add node affinity to Helm chart for improved pod scheduling Added node affinity rules to the Helm chart to ensure that pods are scheduled onto appropriate nodes based on specific criteria. This helps in optimizing resource utilization, enhancing performance, and maintaining workload balance across the cluster. References: - Kubernetes affinity and anti-affinity documentation: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#affinity-and-anti-affinity * Merge branch 'main' into feat/add-affinity Bumped the version from 0.4.11 to 0.4.12, required since #61 adjusted the version towards 0.4.11
1 parent e419b2c commit 4e1f8e4

File tree

6 files changed

+14
-4
lines changed

6 files changed

+14
-4
lines changed

charts/redis-stack-server/Chart.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ type: application
1515
# This is the chart version. This version number should be incremented each time you make changes
1616
# to the chart and its templates, including the app version.
1717
# Versions are expected to follow Semantic Versioning (https://semver.org/)
18-
version: 0.4.11
18+
version: 0.4.12
1919

2020
# This is the version number of the application being deployed. This version number should be
2121
# incremented each time you make changes to the application. Versions are not expected to

charts/redis-stack-server/templates/redis-stack-server.yaml

+6-2
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,13 @@ metadata:
2020
spec:
2121
selector:
2222
matchLabels:
23-
app: "{{ .Values.name }}"
23+
app: "{{ .Values.name }}"
2424
serviceName: "{{ .Values.name }}"
2525
replicas: {{ .Values.redis_stack_server.replicas }}
2626
template:
2727
metadata:
2828
labels:
29-
app: "{{ .Values.name }}"
29+
app: "{{ .Values.name }}"
3030
spec:
3131
terminationGracePeriodSeconds: 10
3232
containers:
@@ -48,3 +48,7 @@ spec:
4848
resources:
4949
requests:
5050
storage: {{ .Values.redis_stack_server.storage }}
51+
{{- if .Values.redis_stack_server.affinity }}
52+
affinity:
53+
{{ toYaml .Values.redis_stack_server.affinity | indent 8 }}
54+
{{- end }}

charts/redis-stack-server/values.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,4 @@ redis_stack_server:
66
replicas: 1
77
storage_class: standard
88
storage: 1Gi
9+
affinity: {}

charts/redis-stack/Chart.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ type: application
1515
# This is the chart version. This version number should be incremented each time you make changes
1616
# to the chart and its templates, including the app version.
1717
# Versions are expected to follow Semantic Versioning (https://semver.org/)
18-
version: 0.4.11
18+
version: 0.4.12
1919

2020
# This is the version number of the application being deployed. This version number should be
2121
# incremented each time you make changes to the application. Versions are not expected to

charts/redis-stack/templates/deployment.yaml

+4
Original file line numberDiff line numberDiff line change
@@ -36,3 +36,7 @@ spec:
3636
cpu: "{{ .Values.redis_stack.cpu }}"
3737
{{- end}}
3838
{{- end}}
39+
{{- if .Values.redis_stack.affinity }}
40+
affinity:
41+
{{ toYaml .Values.redis_stack.affinity | indent 8 }}
42+
{{- end }}

charts/redis-stack/values.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,4 @@ redis_stack:
88
replicas: 1
99
memory: 1Gi
1010
cpu: 100m
11+
affinity: {}

0 commit comments

Comments
 (0)