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