{{- if or (.Values.redisConfig) (.Values.sentinelConfig) }}
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "redis.fullname" . }}
  labels:
    {{- include "redis.labels" . | nindent 4 }}
data:
  {{- if .Values.redisConfig }}
  redis.conf: |
    {{- .Values.redisConfig | nindent 4 }}
  {{- end }}
  {{- if .Values.sentinelConfig }}
  sentinel.conf: |
    {{- .Values.sentinelConfig | nindent 4 }}
  {{- end}}
{{- end }}
