diff --git a/templates/service-replica.yaml b/templates/service-replica.yaml new file mode 100644 index 0000000..84cba6a --- /dev/null +++ b/templates/service-replica.yaml @@ -0,0 +1,19 @@ +{{- if .Values.replication.enabled }} +apiVersion: v1 +kind: Service +metadata: + name: {{ include "postgresql.fullname" . }}-replica + labels: + {{- include "postgresql.labels" . | nindent 4 }} + app.kubernetes.io/component: replica +spec: + type: {{ .Values.service.type }} + ports: + - port: {{ .Values.service.port }} + targetPort: postgres + protocol: TCP + name: postgres + selector: + {{- include "postgresql.selectorLabels" . | nindent 4 }} + app.kubernetes.io/component: replica +{{- end }}