# helm_charts_service-percona.yaml
apiVersion: v1
kind: Service
metadata:
  name: {{ template "percona-xtradb-cluster.fullname" . }}
  labels:
    app: {{ template "percona-xtradb-cluster.fullname" . }}
    chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
    release: "{{ .Release.Name }}"
    heritage: "{{ .Release.Service }}"
spec:
  {{- if .Values.service.percona.headless }}
  clusterIP: None
  {{- end }}
  ports:
  - name: mysql
    port: 3306
    targetPort: mysql
  selector:
    app: {{ template "percona-xtradb-cluster.fullname" . }}
    release: "{{ .Release.Name }}"