Skip to content

Commit 6f81759

Browse files
authored
fix: Chart should cast redisCluster.maxMemoryPercentOfLimit to int (#1585)
Some versions of helm will interpret inline numbers as float64. This can cause a type error when the float64-typed value for redisCluster.maxMemoryPercentOfLimit is compared against this inline integer 0 value. The recommended fix is just to cast the input to an int when doing the comparison.
1 parent 9971e8a commit 6f81759

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

charts/redis-cluster/templates/redis-cluster.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ spec:
3030
{{- end }}
3131

3232
{{- if .Values.redisCluster.maxMemoryPercentOfLimit }}
33-
{{- if gt .Values.redisCluster.maxMemoryPercentOfLimit 0 }}
33+
{{- if gt (int .Values.redisCluster.maxMemoryPercentOfLimit) 0 }}
3434
redisConfig:
3535
maxMemoryPercentOfLimit: {{ .Values.redisCluster.maxMemoryPercentOfLimit }}
3636
{{- end }}

0 commit comments

Comments
 (0)