48 lines
1.6 KiB
YAML
48 lines
1.6 KiB
YAML
{{- if .Values.collector.enabled -}}
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: {{ template "jaeger.collector.name" . }}
|
|
namespace: {{ .Release.Namespace }}
|
|
labels:
|
|
{{- include "jaeger.labels" . | nindent 4 }}
|
|
app.kubernetes.io/component: collector
|
|
{{- if .Values.collector.service.annotations }}
|
|
annotations:
|
|
{{- toYaml .Values.collector.service.annotations | nindent 4 }}
|
|
{{- end }}
|
|
spec:
|
|
ports:
|
|
- name: grpc
|
|
port: {{ .Values.collector.service.grpc.port }}
|
|
{{- if and (eq .Values.collector.service.type "NodePort") (.Values.collector.service.grpc.nodePort) }}
|
|
nodePort: {{ .Values.collector.service.grpc.nodePort }}
|
|
{{- end }}
|
|
protocol: TCP
|
|
targetPort: grpc
|
|
- name: http
|
|
port: {{ .Values.collector.service.http.port }}
|
|
{{- if and (eq .Values.collector.service.type "NodePort") (.Values.collector.service.http.nodePort) }}
|
|
nodePort: {{ .Values.collector.service.http.nodePort }}
|
|
{{- end }}
|
|
protocol: TCP
|
|
targetPort: http
|
|
{{- if .Values.collector.service.zipkin }}
|
|
- name: zipkin
|
|
port: {{ .Values.collector.service.zipkin.port }}
|
|
{{- if and (eq .Values.collector.service.type "NodePort") (.Values.collector.service.zipkin.nodePort) }}
|
|
nodePort: {{ .Values.collector.service.zipkin.nodePort }}
|
|
{{- end }}
|
|
protocol: TCP
|
|
targetPort: zipkin
|
|
{{- end }}
|
|
- name: admin
|
|
port: 14269
|
|
targetPort: admin
|
|
selector:
|
|
{{- include "jaeger.selectorLabels" . | nindent 4 }}
|
|
app.kubernetes.io/component: collector
|
|
type: {{ .Values.collector.service.type }}
|
|
{{- template "loadBalancerSourceRanges" .Values.collector }}
|
|
{{- end -}}
|