apiVersion: v1 kind: Service metadata: name: {{ include "matrix-sliding-sync.fullname" . }} labels: {{- include "matrix-sliding-sync.labels" . | nindent 4 }} spec: type: {{ .Values.service.type }} ports: - name: http protocol: TCP port: {{ .Values.service.port }} targetPort: http {{- with .Values.config.metrics }} - name: metrics protocol: TCP port: {{ . }} targetPort: metrics {{- end }} selector: {{- include "matrix-sliding-sync.selectorLabels" . | nindent 4 }}