From ed3e3e18064da4af3d4393d4ec79615ba4f9a08e Mon Sep 17 00:00:00 2001 From: CG Date: Fri, 13 Oct 2023 09:18:09 +0800 Subject: [PATCH 01/10] feat: add env, tolerations, resources, nodeSelector to redis stack server chart and make service type to be configurable --- .../templates/redis-stack-server.yaml | 22 ++++++++++++++++-- charts/redis-stack-server/values.yaml | 23 ++++++++++++++++++- 2 files changed, 42 insertions(+), 3 deletions(-) diff --git a/charts/redis-stack-server/templates/redis-stack-server.yaml b/charts/redis-stack-server/templates/redis-stack-server.yaml index 8e6fa66..1b71e77 100644 --- a/charts/redis-stack-server/templates/redis-stack-server.yaml +++ b/charts/redis-stack-server/templates/redis-stack-server.yaml @@ -9,7 +9,7 @@ spec: ports: - port: {{ .Values.redis_stack_server.port }} name: db - type: NodePort + type: {{ .Values.redis_stack_server.serviceType }} selector: app: "{{ .Values.name }}" --- @@ -39,6 +39,24 @@ spec: volumeMounts: - name: db mountPath: /data + {{- with .Values.redis_stack_server.env }} + env: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.redis_stack_server.resources }} + resources: + {{- toYaml . | nindent 10 }} + {{- end }} + {{- with .Values.redis_stack_server.nodeSelector }} + nodeSelector: + {{ range $key, $value := . }} + {{ $key }}: {{ $value | quote }} + {{- end }} + {{- end }} + {{- with .Values.redis_stack_server.tolerations }} + tolerations: + {{- toYaml . | nindent 6 }} + {{- end }} volumeClaimTemplates: - metadata: name: db @@ -47,4 +65,4 @@ spec: storageClassName: {{ .Values.redis_stack_server.storage_class }} resources: requests: - storage: {{ .Values.redis_stack_server.storage }} + storage: {{ .Values.redis_stack_server.storage }} \ No newline at end of file diff --git a/charts/redis-stack-server/values.yaml b/charts/redis-stack-server/values.yaml index 8402730..9c6a802 100644 --- a/charts/redis-stack-server/values.yaml +++ b/charts/redis-stack-server/values.yaml @@ -3,6 +3,27 @@ redis_stack_server: image: "redis/redis-stack-server" tag: "7.2.0-v3" port: 6379 + serviceType: ClusterIP replicas: 1 - storage_class: standard + storage_class: default storage: 1Gi + env: + - name: REDIS_ARGS + valueFrom: + secretKeyRef: + name: redis-stack-server + key: redis-args + resources: + limits: + cpu: 200m + memory: 400Mi + requests: + cpu: 100m + memory: 256Mi + nodeSelector: + type: app + tolerations: + - effect: NoSchedule + key: NodeType + operator: Equal + value: app \ No newline at end of file From 2f5ebd93f10b545f21fa5f926705dd620f17ec71 Mon Sep 17 00:00:00 2001 From: CG Date: Sat, 25 Nov 2023 13:26:31 +0800 Subject: [PATCH 02/10] chore: add env, tolerations, nodeSelector to redis stack --- charts/redis-stack-server/Chart.yaml | 4 ++-- charts/redis-stack-server/values.yaml | 8 ++++---- charts/redis-stack/Chart.yaml | 4 ++-- charts/redis-stack/templates/deployment.yaml | 14 ++++++++++++++ charts/redis-stack/values.yaml | 7 +++++++ 5 files changed, 29 insertions(+), 8 deletions(-) diff --git a/charts/redis-stack-server/Chart.yaml b/charts/redis-stack-server/Chart.yaml index e3cd1f8..5cd197a 100644 --- a/charts/redis-stack-server/Chart.yaml +++ b/charts/redis-stack-server/Chart.yaml @@ -15,10 +15,10 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 0.4.6 +version: 0.4.7 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to # follow Semantic Versioning. They should reflect the version the application is using. # It is recommended to use it with quotes. -appVersion: "7.2.1" +appVersion: "7.2.2" \ No newline at end of file diff --git a/charts/redis-stack-server/values.yaml b/charts/redis-stack-server/values.yaml index 689b888..bb988b1 100644 --- a/charts/redis-stack-server/values.yaml +++ b/charts/redis-stack-server/values.yaml @@ -15,11 +15,11 @@ redis_stack_server: key: redis-args resources: limits: - cpu: 200m - memory: 400Mi + cpu: 1 + memory: 4G requests: - cpu: 100m - memory: 256Mi + cpu: 1 + memory: 4G nodeSelector: type: app tolerations: diff --git a/charts/redis-stack/Chart.yaml b/charts/redis-stack/Chart.yaml index 2706b76..86e2a8b 100644 --- a/charts/redis-stack/Chart.yaml +++ b/charts/redis-stack/Chart.yaml @@ -15,10 +15,10 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 0.4.6 +version: 0.4.7 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to # follow Semantic Versioning. They should reflect the version the application is using. # It is recommended to use it with quotes. -appVersion: "7.2.1" +appVersion: "7.2.2" \ No newline at end of file diff --git a/charts/redis-stack/templates/deployment.yaml b/charts/redis-stack/templates/deployment.yaml index bed1a0d..d558602 100644 --- a/charts/redis-stack/templates/deployment.yaml +++ b/charts/redis-stack/templates/deployment.yaml @@ -24,6 +24,10 @@ spec: name: db - containerPort: {{ .Values.redis_stack.redis_insight_port }} name: "{{ .Values.redis_stack.redis_insight }}" + {{- with .Values.redis_stack.env }} + env: + {{- toYaml . | nindent 8 }} + {{- end }} {{- if .Values.redis_stack.resources }} resources: {{- if .Values.redis_stack.resources.requests }} @@ -36,3 +40,13 @@ spec: cpu: "{{ .Values.redis_stack.cpu }}" {{- end}} {{- end}} + {{- with .Values.redis_stack.nodeSelector }} + nodeSelector: + {{ range $key, $value := . }} + {{ $key }}: {{ $value | quote }} + {{- end }} + {{- end }} + {{- with .Values.redis_stack.tolerations }} + tolerations: + {{- toYaml . | nindent 6 }} + {{- end }} diff --git a/charts/redis-stack/values.yaml b/charts/redis-stack/values.yaml index 0cbad97..a5cbf38 100644 --- a/charts/redis-stack/values.yaml +++ b/charts/redis-stack/values.yaml @@ -8,3 +8,10 @@ redis_stack: replicas: 1 memory: 1Gi cpu: 100m + nodeSelector: + type: app + tolerations: + - effect: NoSchedule + key: NodeType + operator: Equal + value: app \ No newline at end of file From e42a7cce4e75c40c99c39335461c7b3d5a7e598f Mon Sep 17 00:00:00 2001 From: CG Date: Sat, 25 Nov 2023 13:28:01 +0800 Subject: [PATCH 03/10] chore: add new line --- charts/redis-stack-server/Chart.yaml | 2 +- charts/redis-stack/Chart.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/charts/redis-stack-server/Chart.yaml b/charts/redis-stack-server/Chart.yaml index 5cd197a..65f3b83 100644 --- a/charts/redis-stack-server/Chart.yaml +++ b/charts/redis-stack-server/Chart.yaml @@ -21,4 +21,4 @@ version: 0.4.7 # incremented each time you make changes to the application. Versions are not expected to # follow Semantic Versioning. They should reflect the version the application is using. # It is recommended to use it with quotes. -appVersion: "7.2.2" \ No newline at end of file +appVersion: "7.2.2" diff --git a/charts/redis-stack/Chart.yaml b/charts/redis-stack/Chart.yaml index 86e2a8b..c1a5e45 100644 --- a/charts/redis-stack/Chart.yaml +++ b/charts/redis-stack/Chart.yaml @@ -21,4 +21,4 @@ version: 0.4.7 # incremented each time you make changes to the application. Versions are not expected to # follow Semantic Versioning. They should reflect the version the application is using. # It is recommended to use it with quotes. -appVersion: "7.2.2" \ No newline at end of file +appVersion: "7.2.2" From dc816dd783ee3867d5cdc6e75c2f546d674f51b9 Mon Sep 17 00:00:00 2001 From: CG Date: Sat, 25 Nov 2023 18:36:42 +0800 Subject: [PATCH 04/10] Update Chart.yaml --- charts/redis-stack-server/Chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/redis-stack-server/Chart.yaml b/charts/redis-stack-server/Chart.yaml index 65f3b83..5cd197a 100644 --- a/charts/redis-stack-server/Chart.yaml +++ b/charts/redis-stack-server/Chart.yaml @@ -21,4 +21,4 @@ version: 0.4.7 # incremented each time you make changes to the application. Versions are not expected to # follow Semantic Versioning. They should reflect the version the application is using. # It is recommended to use it with quotes. -appVersion: "7.2.2" +appVersion: "7.2.2" \ No newline at end of file From 0fdef1b4cc11bd0aa37b4b2041aefd7a6ad4e3df Mon Sep 17 00:00:00 2001 From: CG Date: Sat, 25 Nov 2023 18:37:01 +0800 Subject: [PATCH 05/10] Update Chart.yaml --- charts/redis-stack/Chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/redis-stack/Chart.yaml b/charts/redis-stack/Chart.yaml index c1a5e45..86e2a8b 100644 --- a/charts/redis-stack/Chart.yaml +++ b/charts/redis-stack/Chart.yaml @@ -21,4 +21,4 @@ version: 0.4.7 # incremented each time you make changes to the application. Versions are not expected to # follow Semantic Versioning. They should reflect the version the application is using. # It is recommended to use it with quotes. -appVersion: "7.2.2" +appVersion: "7.2.2" \ No newline at end of file From 4d47585f8e3d0847b2f931d84ee3c7c0d83014ad Mon Sep 17 00:00:00 2001 From: ofekshenawa <104765379+ofekshenawa@users.noreply.github.com> Date: Mon, 4 Dec 2023 10:00:48 +0200 Subject: [PATCH 06/10] Update Chart.yaml --- charts/redis-stack-server/Chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/redis-stack-server/Chart.yaml b/charts/redis-stack-server/Chart.yaml index 5cd197a..65f3b83 100644 --- a/charts/redis-stack-server/Chart.yaml +++ b/charts/redis-stack-server/Chart.yaml @@ -21,4 +21,4 @@ version: 0.4.7 # incremented each time you make changes to the application. Versions are not expected to # follow Semantic Versioning. They should reflect the version the application is using. # It is recommended to use it with quotes. -appVersion: "7.2.2" \ No newline at end of file +appVersion: "7.2.2" From fb43457d6eb906be5981df58eb5e46bf60997774 Mon Sep 17 00:00:00 2001 From: ofekshenawa <104765379+ofekshenawa@users.noreply.github.com> Date: Mon, 4 Dec 2023 10:01:14 +0200 Subject: [PATCH 07/10] Update Chart.yaml --- charts/redis-stack/Chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/redis-stack/Chart.yaml b/charts/redis-stack/Chart.yaml index 86e2a8b..c1a5e45 100644 --- a/charts/redis-stack/Chart.yaml +++ b/charts/redis-stack/Chart.yaml @@ -21,4 +21,4 @@ version: 0.4.7 # incremented each time you make changes to the application. Versions are not expected to # follow Semantic Versioning. They should reflect the version the application is using. # It is recommended to use it with quotes. -appVersion: "7.2.2" \ No newline at end of file +appVersion: "7.2.2" From cc0a79d9f9440864853a1df0984e24c29320fb08 Mon Sep 17 00:00:00 2001 From: ofekshenawa <104765379+ofekshenawa@users.noreply.github.com> Date: Mon, 4 Dec 2023 10:05:12 +0200 Subject: [PATCH 08/10] Update redis-stack-server.yaml --- charts/redis-stack-server/templates/redis-stack-server.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/redis-stack-server/templates/redis-stack-server.yaml b/charts/redis-stack-server/templates/redis-stack-server.yaml index 1b71e77..cdc8f4c 100644 --- a/charts/redis-stack-server/templates/redis-stack-server.yaml +++ b/charts/redis-stack-server/templates/redis-stack-server.yaml @@ -65,4 +65,4 @@ spec: storageClassName: {{ .Values.redis_stack_server.storage_class }} resources: requests: - storage: {{ .Values.redis_stack_server.storage }} \ No newline at end of file + storage: {{ .Values.redis_stack_server.storage }} From a96378c1c497155616ef6efbdcaddd3ac81a2a0f Mon Sep 17 00:00:00 2001 From: ofekshenawa <104765379+ofekshenawa@users.noreply.github.com> Date: Mon, 4 Dec 2023 10:05:33 +0200 Subject: [PATCH 09/10] Update values.yaml --- charts/redis-stack-server/values.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/redis-stack-server/values.yaml b/charts/redis-stack-server/values.yaml index bb988b1..e22ad38 100644 --- a/charts/redis-stack-server/values.yaml +++ b/charts/redis-stack-server/values.yaml @@ -26,4 +26,4 @@ redis_stack_server: - effect: NoSchedule key: NodeType operator: Equal - value: app \ No newline at end of file + value: app From b246ebcbb677248470427eb3287009504c8f9f6a Mon Sep 17 00:00:00 2001 From: ofekshenawa <104765379+ofekshenawa@users.noreply.github.com> Date: Mon, 4 Dec 2023 10:05:50 +0200 Subject: [PATCH 10/10] Update values.yaml --- charts/redis-stack/values.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/redis-stack/values.yaml b/charts/redis-stack/values.yaml index a5cbf38..10d9338 100644 --- a/charts/redis-stack/values.yaml +++ b/charts/redis-stack/values.yaml @@ -14,4 +14,4 @@ redis_stack: - effect: NoSchedule key: NodeType operator: Equal - value: app \ No newline at end of file + value: app