Skip to content

Commit 657b28c

Browse files
committed
chore(charts): change resources format
1 parent 1e74134 commit 657b28c

2 files changed

Lines changed: 39 additions & 22 deletions

File tree

charts/valkey/templates/valkey-statefulset.yaml

Lines changed: 12 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,10 @@ spec:
4343
value: {{ printf "drycc-valkey.%s.svc.%s" $.Release.Namespace $.Values.global.clusterDomain }}
4444
ports:
4545
- containerPort: 16379
46+
{{- with index .Values "proxy" "resources" }}
47+
resources:
48+
{{- toYaml . | nindent 10 }}
49+
{{- end }}
4650
startupProbe:
4751
initialDelaySeconds: 10
4852
periodSeconds: 10
@@ -70,16 +74,6 @@ spec:
7074
- name: server
7175
image: {{.Values.imageRegistry}}/{{.Values.imageOrg}}/valkey:{{ .Values.imageTag }}
7276
imagePullPolicy: {{ .Values.imagePullPolicy }}
73-
{{- if or (.Values.limitsCpu) (.Values.limitsMemory)}}
74-
resources:
75-
limits:
76-
{{- if (.Values.limitsCpu) }}
77-
cpu: {{.Values.limitsCpu}}
78-
{{- end}}
79-
{{- if (.Values.limitsMemory) }}
80-
memory: {{.Values.limitsMemory}}
81-
{{- end}}
82-
{{- end}}
8377
{{- if .Values.diagnosticMode.enabled }}
8478
command: {{- include "common.tplvalues.render" (dict "value" .Values.diagnosticMode.command "context" $) | nindent 10 }}
8579
args: {{- include "common.tplvalues.render" (dict "value" .Values.diagnosticMode.args "context" $) | nindent 10 }}
@@ -91,6 +85,10 @@ spec:
9185
{{- end }}
9286
ports:
9387
- containerPort: 6379
88+
{{- with index .Values "server" "resources" }}
89+
resources:
90+
{{- toYaml . | nindent 10 }}
91+
{{- end }}
9492
env:
9593
- name: POD_NAME
9694
valueFrom:
@@ -151,16 +149,6 @@ spec:
151149
- name: sentinel
152150
image: {{.Values.imageRegistry}}/{{.Values.imageOrg}}/valkey:{{ .Values.imageTag }}
153151
imagePullPolicy: {{ .Values.imagePullPolicy }}
154-
{{- if or (.Values.limitsCpu) (.Values.limitsMemory)}}
155-
resources:
156-
limits:
157-
{{- if (.Values.limitsCpu) }}
158-
cpu: {{.Values.limitsCpu}}
159-
{{- end}}
160-
{{- if (.Values.limitsMemory) }}
161-
memory: {{.Values.limitsMemory}}
162-
{{- end}}
163-
{{- end}}
164152
{{- if .Values.diagnosticMode.enabled }}
165153
command: {{- include "common.tplvalues.render" (dict "value" .Values.diagnosticMode.command "context" $) | nindent 10 }}
166154
args: {{- include "common.tplvalues.render" (dict "value" .Values.diagnosticMode.args "context" $) | nindent 10 }}
@@ -172,6 +160,10 @@ spec:
172160
{{- end }}
173161
ports:
174162
- containerPort: 26379
163+
{{- with index .Values "sentinel" "resources" }}
164+
resources:
165+
{{- toYaml . | nindent 10 }}
166+
{{- end }}
175167
env:
176168
- name: POD_NAME
177169
valueFrom:

charts/valkey/values.yaml

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@ imageOrg: "drycc"
22
imagePullPolicy: "Always"
33
imageTag: "canary"
44
imageRegistry: "registry.drycc.cc"
5-
# limitsCpu: "100m"
6-
# limitsMemory: "50Mi"
75

86
## Enable diagnostic mode
97
##
@@ -44,6 +42,33 @@ service:
4442
# Provide any additional service annotations
4543
annotations: {}
4644

45+
proxy:
46+
resources: {}
47+
# limits:
48+
# cpu: 200m
49+
# memory: 50Mi
50+
# requests:
51+
# cpu: 100m
52+
# memory: 30Mi
53+
54+
server:
55+
resources: {}
56+
# limits:
57+
# cpu: 200m
58+
# memory: 50Mi
59+
# requests:
60+
# cpu: 100m
61+
# memory: 30Mi
62+
63+
sentinel:
64+
resources: {}
65+
# limits:
66+
# cpu: 200m
67+
# memory: 50Mi
68+
# requests:
69+
# cpu: 100m
70+
# memory: 30Mi
71+
4772
# GCP PDs and EBS volumes are supported only
4873
persistence:
4974
enabled: false # Set to true to enable persistence

0 commit comments

Comments
 (0)