apiVersion: v1
kind: Service
metadata:
  name: {{ include "karma.fullname" . }}
  labels:
    app.kubernetes.io/name: {{ include "karma.name" . }}
    helm.sh/chart: {{ include "karma.chart" . }}
    app.kubernetes.io/instance: {{ .Release.Name }}
    app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- if .Values.service.labels }}
{{ toYaml .Values.service.labels | indent 4 }}
{{- end }}
  annotations:
{{ toYaml .Values.service.annotations | indent 4 }}
spec:
  type: {{ .Values.service.type }}
  ports:
    - port: {{ .Values.service.port }}
      targetPort: http
      protocol: TCP
      name: http
  selector:
    app.kubernetes.io/name: {{ include "karma.name" . }}
    app.kubernetes.io/instance: {{ .Release.Name }}
