apiVersion: apps/v1 kind: Deployment metadata: name: ob-server-java namespace: observe labels: app.kubernetes.io/name: ob-server-java spec: selector: matchLabels: app.kubernetes.io/name: ob-server-java replicas: 1 template: metadata: labels: app.kubernetes.io/name: ob-server-java spec: shareProcessNamespace: true containers: - name: observe-server-java image: reg.cestong.com.cn/cecf/java-simple imagePullPolicy: Always command: - java - "-javaagent:opentelemetry-javaagent.jar" - -DAPP_NAME=javasimple - -jar - java-simple.jar ports: - name: web containerPort: 8080 protocol: TCP env: # - name: JAVA_TOOL_OPTIONS # value: -javaagent:/usr/src/app/opentelemetry-javaagent.jar - name: OTEL_SERVICE_NAME value: java-simple-service - name: OTEL_EXPORTER_OTLP_ENDPOINT value: "http://otel-collector-opentelemetry-collector.observe.svc.cluster.local:4318" - name: OTEL_TRACES_EXPORTER value: otlp - name: OTEL_METRICS_EXPORTER value: none - name: OTEL_LOGS_EXPORTER value: none - name: OTEL_EXPORTER_OTLP_PROTOCOL value: http/protobuf - name: OTEL_RESOURCE_ATTRIBUTES value: app.name=javasimple,service.version=0.0.1