{{- if eq (include "erpnext.redisCacheHost" .) ""}} apiVersion: v1 kind: Service metadata: name: {{ include "erpnext.fullname" . }}-redis-cache labels: {{- include "erpnext.labels" . | nindent 4 }} spec: type: {{ .Values.redisCacheService.type }} ports: - port: {{ .Values.redisCacheService.port }} targetPort: 6379 selector: app.kubernetes.io/name: {{ include "erpnext.name" . }}-redis-cache app.kubernetes.io/instance: {{ .Release.Name }}-redis-cache {{- end }}