{{- if eq .Values.global.deploymentMode "development" }}
apiVersion: v1
kind: Service
metadata:
  name: {{ include "wiremock.fullname" . }}
  labels:
    app.kubernetes.io/name: {{ include "wiremock.name" . }}
    helm.sh/chart: {{ include "wiremock.chart" . }}
    app.kubernetes.io/instance: {{ .Release.Name }}
    app.kubernetes.io/managed-by: {{ .Release.Service }}
spec:
  type: {{ .Values.service.type }}
  ports:
    - port: {{ .Values.service.externalPort }}
      targetPort: {{ .Values.service.internalPort }}
      protocol: TCP
      name: {{ .Values.service.name }}
  selector:
    app.kubernetes.io/name: {{ include "wiremock.name" . }}
    app.kubernetes.io/instance: {{ .Release.Name }}
{{- end }}
