apiVersion: v1
kind: Service
metadata:
  name: {{ template "hazelcast.fullname" . }}
  labels:
    app: {{ template "hazelcast.name" . }}
    chart: {{ template "hazelcast.chart" . }}
    release: "{{ .Release.Name }}"
    heritage: "{{ .Release.Service }}"
spec:
  type: {{ .Values.service.type }}
  {{- if .Values.service.clusterIP }}
  clusterIP: {{ .Values.service.clusterIP }}
  {{- end }}
  selector:
    app: {{ template "hazelcast.name" . }}
    release: "{{ .Release.Name }}"
  ports:
  - protocol: TCP
    port: {{ .Values.service.port }}
    targetPort: hazelcast
    name: hzport
