| apiVersion: v1 |
| kind: Service |
| metadata: |
| name: {{ template "common.fullname" . }}-headless |
| labels: |
| app: {{ template "common.name" . }} |
| chart: {{ .Chart.Name }} |
| release: {{ include "common.release" . }} |
| heritage: {{ .Release.Service }} |
| spec: |
| clusterIP: None |
| ports: |
| {{- range $key, $port := .Values.ports }} |
| - name: {{ $key }} |
| port: {{ $port.containerPort }} |
| targetPort: {{ $port.name }} |
| protocol: {{ $port.protocol }} |
| {{- end }} |
| selector: |
| app: {{ template "common.name" . }} |
| release: {{ include "common.release" . }} |