diff --git a/charts/proxy/templates/deployment.yaml b/charts/proxy/templates/deployment.yaml index 164166a1..f8947fa6 100644 --- a/charts/proxy/templates/deployment.yaml +++ b/charts/proxy/templates/deployment.yaml @@ -35,6 +35,12 @@ spec: - name: ATHENS_NETRC_PATH value: "/etc/netrc/netrc" {{- end }} + {{- if .Values.jaeger.enabled }} + - name: ATHENS_TRACE_EXPORTER_URL + value: {{ .Values.jaeger.url | quote }} + - name: ATHENS_TRACE_EXPORTER + value: "jaeger" + {{- end }} # TODO: re-enable when workers are used # SPACES of template must be fixed back while re-enabling #- name: ATHENS_REDIS_QUEUE_ADDRESS diff --git a/charts/proxy/templates/jaeger-deploy.yaml b/charts/proxy/templates/jaeger-deploy.yaml new file mode 100644 index 00000000..913ce1d0 --- /dev/null +++ b/charts/proxy/templates/jaeger-deploy.yaml @@ -0,0 +1,41 @@ +{{- if .Values.jaeger.enabled -}} +apiVersion: extensions/v1beta1 +kind: Deployment +metadata: + name: {{ template "fullname" . }}-jaeger + labels: + app: {{ template "fullname" . }}-jaeger + chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" + release: "{{ .Release.Name }}" + heritage: "{{ .Release.Service }}" +spec: + replicas: 1 + template: + metadata: + labels: + app: {{ template "fullname" . }}-jaeger + chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" + release: "{{ .Release.Name }}" + spec: + containers: + - env: + - name: COLLECTOR_ZIPKIN_HTTP_PORT + value: "9441" + image: "{{ .Values.jaeger.image.repository }}:{{ .Values.jaeger.image.tag }}" + name: {{ template "fullname" . }}-jaeger + ports: + - containerPort: 14268 + protocol: TCP + - containerPort: 5775 + protocol: UDP + - containerPort: 6831 + protocol: UDP + - containerPort: 6832 + protocol: UDP + - containerPort: 5778 + protocol: TCP + - containerPort: 16686 + protocol: TCP + - containerPort: 9411 + protocol: TCP +{{- end -}} diff --git a/charts/proxy/templates/jaeger-svc.yaml b/charts/proxy/templates/jaeger-svc.yaml new file mode 100644 index 00000000..edee3f16 --- /dev/null +++ b/charts/proxy/templates/jaeger-svc.yaml @@ -0,0 +1,40 @@ +{{- if .Values.jaeger.enabled -}} +apiVersion: v1 +kind: Service +metadata: + name: {{ template "fullname" . }}-jaeger + labels: + app: {{ template "fullname" . }}-jaeger + chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" + release: "{{ .Release.Name }}" + heritage: "{{ .Release.Service }}" +spec: + type: {{ .Values.jaeger.type }} + selector: + app: {{ template "fullname" . }}-jaeger + ports: + - name: jaeger-collector-http + port: 14268 + protocol: TCP + targetPort: 14268 + - name: jaeger-zipkin-thrift + port: 5775 + protocol: UDP + targetPort: 5775 + - name: jaeger-compact + port: 6831 + protocol: UDP + targetPort: 6831 + - name: jaeger-binary + port: 6832 + protocol: UDP + targetPort: 6832 + - name: jaeger-configs + port: 5778 + protocol: TCP + targetPort: 5778 + - name: jaeger-query-http + port: 16686 + protocol: TCP + targetPort: 16686 +{{- end -}} diff --git a/charts/proxy/templates/service.yaml b/charts/proxy/templates/service.yaml index b37b532f..04d8edcd 100644 --- a/charts/proxy/templates/service.yaml +++ b/charts/proxy/templates/service.yaml @@ -18,4 +18,4 @@ spec: protocol: TCP {{- if eq .Values.service.type "NodePort" }} nodePort: {{ .Values.service.nodePort.port }} - {{- end }} \ No newline at end of file + {{- end }} diff --git a/charts/proxy/values.yaml b/charts/proxy/values.yaml index 5360de20..6437e482 100644 --- a/charts/proxy/values.yaml +++ b/charts/proxy/values.yaml @@ -53,3 +53,14 @@ netrc: # username: # password: # host: + +jaeger: + ## Type of service; valid values are "ClusterIP", "LoadBalancer", and "NodePort". + type: ClusterIP + image: + repository: jaegertracing/all-in-one + tag: latest + enabled: true + # you must set this on the command line when you run 'helm install' + # for example, you need to run 'helm install --set jaeger.url=myurl ...' + url: "SET THIS ON THE COMMAND LINE" diff --git a/scripts/test_unit.sh b/scripts/test_unit.sh index ad878a7f..e33a2156 100755 --- a/scripts/test_unit.sh +++ b/scripts/test_unit.sh @@ -6,6 +6,8 @@ if [ -z ${GO_ENV} ]; then export GO_ENV="test" fi +export GO111MODULE=on + # Run the unit tests with the race detector and code coverage enabled set -xeuo pipefail go test -mod=vendor -race -coverprofile cover.out -covermode atomic ./...