Tinoj Joseph | dd1fd9d | 2022-08-01 23:59:26 +0530 | [diff] [blame^] | 1 | apiVersion: v1 |
| 2 | kind: ConfigMap |
| 3 | metadata: |
| 4 | name: {{ template "redis.fullname" . }} |
| 5 | namespace: {{ .Release.Namespace | quote }} |
| 6 | labels: |
| 7 | app: {{ template "redis.name" . }} |
| 8 | chart: {{ template "redis.chart" . }} |
| 9 | heritage: {{ .Release.Service }} |
| 10 | release: {{ .Release.Name }} |
| 11 | data: |
| 12 | redis.conf: |- |
| 13 | {{- if .Values.configmap }} |
| 14 | # User-supplied configuration: |
| 15 | {{- tpl .Values.configmap . | nindent 4 }} |
| 16 | {{- end }} |
| 17 | master.conf: |- |
| 18 | dir {{ .Values.master.persistence.path }} |
| 19 | {{- if .Values.master.configmap }} |
| 20 | # User-supplied master configuration: |
| 21 | {{- tpl .Values.master.configmap . | nindent 4 }} |
| 22 | {{- end }} |
| 23 | {{- if .Values.master.disableCommands }} |
| 24 | {{- range .Values.master.disableCommands }} |
| 25 | rename-command {{ . }} "" |
| 26 | {{- end }} |
| 27 | {{- end }} |
| 28 | replica.conf: |- |
| 29 | dir {{ .Values.slave.persistence.path }} |
| 30 | slave-read-only yes |
| 31 | {{- if .Values.slave.configmap }} |
| 32 | # User-supplied slave configuration: |
| 33 | {{- tpl .Values.slave.configmap . | nindent 4 }} |
| 34 | {{- end }} |
| 35 | {{- if .Values.slave.disableCommands }} |
| 36 | {{- range .Values.slave.disableCommands }} |
| 37 | rename-command {{ . }} "" |
| 38 | {{- end }} |
| 39 | {{- end }} |
| 40 | {{- if .Values.global.redis.sentinel.enabled }} |
| 41 | sentinel.conf: |- |
| 42 | dir "/tmp" |
| 43 | # bind 0.0.0.0 :: |
| 44 | port {{ .Values.sentinel.port }} |
| 45 | sentinel monitor {{ .Values.sentinel.masterSet }} {{ template "redis.fullname" . }}-node-0.{{ template "redis.fullname" . }}-headless.{{ .Release.Namespace }}.svc.{{ .Values.clusterDomain }} {{ .Values.redisPort }} {{ .Values.sentinel.quorum }} |
| 46 | sentinel down-after-milliseconds {{ .Values.sentinel.masterSet }} {{ .Values.sentinel.downAfterMilliseconds }} |
| 47 | sentinel failover-timeout {{ .Values.sentinel.masterSet }} {{ .Values.sentinel.failoverTimeout }} |
| 48 | sentinel parallel-syncs {{ .Values.sentinel.masterSet }} {{ .Values.sentinel.parallelSyncs }} |
| 49 | {{- if .Values.sentinel.configmap }} |
| 50 | # User-supplied sentinel configuration: |
| 51 | {{- tpl .Values.sentinel.configmap . | nindent 4 }} |
| 52 | {{- end }} |
| 53 | {{- end }} |