apiVersion: v1
kind: Service
metadata:
  name: {{ include "fhirflare-ig-toolkit.fullname" . }}
  labels:
    {{- include "fhirflare-ig-toolkit.labels" . | nindent 4 }}
spec:
  type: {{ .Values.service.type | default "ClusterIP" }}
  ports:
    - name: http
      port: {{ .Values.service.port | default 5000 }}
      targetPort: {{ .Values.service.port | default 5000 }}
      protocol: TCP
      {{- if and (eq .Values.service.type "NodePort") .Values.service.nodePort }}
      nodePort: {{ .Values.service.nodePort }}
      {{- end }}
  selector:
    {{- include "fhirflare-ig-toolkit.selectorLabels" . | nindent 4 }}