Compare commits

...

3 Commits

Author SHA1 Message Date
liuyu
687cb451af fix: wrong annotation configurations 2025-03-13 16:50:37 +08:00
liuyu
04df191825 fix: wrong annotation configurations 2025-03-13 16:48:57 +08:00
liuyu
ac34bf3857 olares: fix the opentelemetry annotations configuration bug 2025-03-13 15:53:40 +08:00
6 changed files with 43 additions and 19 deletions

View File

@@ -38,15 +38,16 @@ spec:
selector:
matchLabels:
app: files
annotations:
instrumentation.opentelemetry.io/inject-go: "olares-instrumentation"
instrumentation.opentelemetry.io/inject-nginx: "olares-instrumentation"
instrumentation.opentelemetry.io/inject-nginx-container-names: "nginx"
instrumentation.opentelemetry.io/go-container-names: "gateway,files,uploader"
template:
metadata:
labels:
app: files
annotations:
# instrumentation.opentelemetry.io/inject-nginx: "olares-instrumentation"
# instrumentation.opentelemetry.io/inject-nginx-container-names: "nginx"
instrumentation.opentelemetry.io/inject-go: "olares-instrumentation"
instrumentation.opentelemetry.io/go-container-names: "gateway,files,uploader"
instrumentation.opentelemetry.io/otel-go-auto-target-exe: "/filebrowser"
spec:
serviceAccount: os-internal
serviceAccountName: os-internal

View File

@@ -112,9 +112,11 @@ spec:
labels:
app: files
io.bytetrade.app: "true"
annotations:
instrumentation.opentelemetry.io/inject-nginx: "olares-instrumentation"
instrumentation.opentelemetry.io/inject-nginx-container-names: "files-frontend"
annotations:
# support nginx 1.24.3 1.25.3
# instrumentation.opentelemetry.io/inject-nginx: "olares-instrumentation"
# instrumentation.opentelemetry.io/inject-nginx-container-names: "files-frontend"
# instrumentation.opentelemetry.io/otel-go-auto-target-exe: "drive"
spec:
serviceAccountName: bytetrade-controller
securityContext:

View File

@@ -136,11 +136,11 @@ spec:
labels:
app: system-frontend
io.bytetrade.app: "true"
annotations:
instrumentation.opentelemetry.io/inject-nodejs: "olares-instrumentation"
instrumentation.opentelemetry.io/nodejs-container-names: "settings-server"
instrumentation.opentelemetry.io/inject-nginx: "olares-instrumentation"
instrumentation.opentelemetry.io/inject-nginx-container-names: "system-frontend"
annotations:
instrumentation.opentelemetry.io/inject-nodejs: "olares-instrumentation"
instrumentation.opentelemetry.io/nodejs-container-names: "settings-server"
# instrumentation.opentelemetry.io/inject-nginx: "olares-instrumentation"
# instrumentation.opentelemetry.io/inject-nginx-container-names: "system-frontend"
spec:
priorityClassName: "system-cluster-critical"
initContainers:

View File

@@ -199,11 +199,12 @@ spec:
metadata:
labels:
tier: bfl
annotations:
instrumentation.opentelemetry.io/inject-go: "olares-instrumentation"
instrumentation.opentelemetry.io/inject-nginx: "olares-instrumentation"
instrumentation.opentelemetry.io/inject-nginx-container-names: "ingress"
instrumentation.opentelemetry.io/go-container-names: "api"
annotations:
instrumentation.opentelemetry.io/inject-go: "olares-instrumentation"
instrumentation.opentelemetry.io/go-container-names: "api"
instrumentation.opentelemetry.io/otel-go-auto-target-exe: "/bfl-api"
# instrumentation.opentelemetry.io/inject-nginx: "olares-instrumentation"
# instrumentation.opentelemetry.io/inject-nginx-container-names: "ingress"
spec:
{{ if .Values.bfl.admin_user }}
affinity:

View File

@@ -551,6 +551,8 @@ spec:
- --enable-leader-election
- --health-probe-addr=:8081
- --webhook-port=9443
- --enable-nginx-instrumentation
- --enable-go-instrumentation
- --collector-image=otel/opentelemetry-collector-k8s:0.118.0
command:
- /manager

View File

@@ -27,6 +27,15 @@ spec:
env:
- name: OTEL_EXPORTER_OTLP_ENDPOINT
value: http://jaeger-storage-instance-collector.os-system:4318
nginx:
env:
- name: OTEL_EXPORTER_OTLP_ENDPOINT
value: http://jaeger-storage-instance-collector.os-system:4318
go:
env:
- name: OTEL_EXPORTER_OTLP_ENDPOINT
value: http://jaeger-storage-instance-collector.os-system:4318
---
apiVersion: opentelemetry.io/v1alpha1
@@ -55,4 +64,13 @@ spec:
nodejs:
env:
- name: OTEL_EXPORTER_OTLP_ENDPOINT
value: http://jaeger-storage-instance-collector.os-system:4318
value: http://jaeger-storage-instance-collector.os-system:4318
nginx:
env:
- name: OTEL_EXPORTER_OTLP_ENDPOINT
value: http://jaeger-storage-instance-collector.os-system:4318
go:
env:
- name: OTEL_EXPORTER_OTLP_ENDPOINT
value: http://jaeger-storage-instance-collector.os-system:4318