Skip to content

Commit

Permalink
feat: provide redis.clusterEndpoints option
Browse files Browse the repository at this point in the history
  • Loading branch information
omidasadpour authored and endersonmaia committed Aug 24, 2023
1 parent ac2d88e commit ec6fb3a
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 2 deletions.
3 changes: 2 additions & 1 deletion charts/rollups-validator-node/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -156,8 +156,9 @@ The command removes all the Kubernetes components associated with the chart and
| postgresql.image.tag | string | `"13.9.0-debian-11-r27"` | bitnami postgreSQL docker image tag. |
| redis.architecture | string | `"standalone"` | Redis® architecture. Allowed values: `standalone` or `replication` |
| redis.auth.enabled | bool | `false` | Redis® Enable password authentication |
| redis.clusterEndpoints | list | `[]` | redis.clusterEndpoints: e.g.: [ "redis://localhost:6379" ] REQUIRED if you disabled redis and your redis is cluster |
| redis.enabled | bool | `true` | Use bitnami Redis® pod. |
| redis.endpoint | string | `nil` | redis.endpoint: e.g.: redis://localhost:6379 REQUIRED if you disabled redis |
| redis.endpoint | string | `nil` | redis.endpoint: e.g.: redis://localhost:6379 REQUIRED if you disabled redis and your redis is standalone |
| redis.image.tag | string | `"6.2-debian-11"` | Redis® docker image tag. |
| redis.metrics.enabled | bool | `true` | sidecar prometheus exporter to expose Redis® metrics |
| serverManager.advanceRunner.args | list | `[]` | Override default container args (useful when using custom images) |
Expand Down
12 changes: 12 additions & 0 deletions charts/rollups-validator-node/templates/dispatcher-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,15 @@ spec:
- {{ print "--tx-chain-id=" (include "dapp.chainID" .) | quote }}
{{- end }}
{{- if .Values.redis.enabled }}
{{- if eq .Values.redis.architecture "replication" }}
- {{ print "--redis-cluster-endpoints=redis://" .Release.Name "-redis-master" | quote }}
{{- else if eq .Values.redis.architecture "standalone" }}
- {{ print "--redis-endpoint=redis://" .Release.Name "-redis-master" | quote }}
{{- end }}
{{- else if .Values.redis.endpoint }}
- {{ print "--redis-endpoint=" .Values.redis.endpoint | quote }}
{{- else if .Values.redis.clusterEndpoints }}
- {{ print "--redis-cluster-endpoints=" (join "," .Values.redis.clusterEndpoints) | quote }}
{{- end }}
{{- range .Values.validator.dispatcher.args }}
- {{ . | quote}}
Expand Down Expand Up @@ -198,9 +204,15 @@ spec:
- {{ print "--chain-id=" (include "dapp.chainID" .) | quote }}
{{- end }}
{{- if .Values.redis.enabled }}
{{- if eq .Values.redis.architecture "replication" }}
- {{ print "--redis-cluster-endpoints=redis://" .Release.Name "-redis-master" | quote }}
{{- else if eq .Values.redis.architecture "standalone" }}
- {{ print "--redis-endpoint=redis://" .Release.Name "-redis-master" | quote }}
{{- end }}
{{- else if .Values.redis.endpoint }}
- {{ print "--redis-endpoint=" .Values.redis.endpoint | quote }}
{{- else if .Values.redis.clusterEndpoints }}
- {{ print "--redis-cluster-endpoints=" (join "," .Values.redis.clusterEndpoints) | quote }}
{{- end }}
{{- range .Values.validator.indexer.args }}
- {{ . | quote}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,15 @@ spec:
- {{ print "--dapp-contract-address=" .Values.dapp.contractAddress | quote }}
{{- end }}
{{- if .Values.redis.enabled }}
{{- if eq .Values.redis.architecture "replication" }}
- {{ print "--redis-cluster-endpoints=redis://" .Release.Name "-redis-master" | quote }}
{{- else if eq .Values.redis.architecture "standalone" }}
- {{ print "--redis-endpoint=redis://" .Release.Name "-redis-master" | quote }}
{{- end }}
{{- else if .Values.redis.endpoint }}
- {{ print "--redis-endpoint=" .Values.redis.endpoint | quote }}
{{- else if .Values.redis.clusterEndpoints }}
- {{ print "--redis-cluster-endpoints=" (join "," .Values.redis.clusterEndpoints) | quote }}
{{- end }}
{{- range .Values.serverManager.advanceRunner.args }}
- {{ . | quote}}
Expand Down
5 changes: 4 additions & 1 deletion charts/rollups-validator-node/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -827,8 +827,11 @@ redis:
# -- Use bitnami Redis® pod.
enabled: true
# -- redis.endpoint: e.g.: redis://localhost:6379
# REQUIRED if you disabled redis
# REQUIRED if you disabled redis and your redis is standalone
endpoint:
# -- redis.clusterEndpoints: e.g.: [ "redis://localhost:6379" ]
# REQUIRED if you disabled redis and your redis is cluster
clusterEndpoints: []
image:
# -- Redis® docker image tag.
tag: 6.2-debian-11
Expand Down

0 comments on commit ec6fb3a

Please sign in to comment.