forked from open-telemetry/opentelemetry-demo
-
Notifications
You must be signed in to change notification settings - Fork 36
/
deployment.yaml
145 lines (136 loc) · 3.33 KB
/
deployment.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
default:
image:
repository: ghcr.io/elastic/opentelemetry-demo
tag: 1.12.1
envOverrides:
- name: OTEL_SERVICE_NAME
valueFrom:
fieldRef:
apiVersion: v1
fieldPath: metadata.labels['app.kubernetes.io/component']
- name: OTEL_K8S_NAMESPACE
valueFrom:
fieldRef:
apiVersion: v1
fieldPath: metadata.namespace
- name: OTEL_K8S_NODE_NAME
valueFrom:
fieldRef:
apiVersion: v1
fieldPath: spec.nodeName
- name: OTEL_K8S_POD_NAME
valueFrom:
fieldRef:
apiVersion: v1
fieldPath: metadata.name
- name: OTEL_K8S_POD_UID
valueFrom:
fieldRef:
apiVersion: v1
fieldPath: metadata.uid
- name: OTEL_RESOURCE_ATTRIBUTES
value: 'service.name=$(OTEL_SERVICE_NAME),service.instance.id=$(OTEL_K8S_POD_UID),service.namespace=opentelemetry-demo,k8s.namespace.name=$(OTEL_K8S_NAMESPACE),k8s.node.name=$(OTEL_K8S_NODE_NAME),k8s.pod.name=$(OTEL_K8S_POD_NAME)'
opentelemetry-collector:
image:
repository: docker.elastic.co/beats/elastic-agent
tag: 8.16.0
mode: "deployment"
presets:
kubernetesAttributes:
enabled: true
kubernetesEvents:
enabled: true
clusterMetrics:
enabled: true
extraEnvs:
- name: ELASTIC_AGENT_OTEL
value: "true"
- name: ELASTIC_APM_ENDPOINT
valueFrom:
secretKeyRef:
name: elastic-secret
key: elastic_apm_endpoint
- name: ELASTIC_APM_SECRET_TOKEN
valueFrom:
secretKeyRef:
name: elastic-secret
key: elastic_apm_secret_token
alternateConfig:
extensions:
health_check:
endpoint: ${env:MY_POD_IP}:13133
connectors:
spanmetrics: {}
exporters:
debug: {}
otlp/elastic:
endpoint: ${env:ELASTIC_APM_ENDPOINT}
compression: none
headers:
Authorization: ${env:ELASTIC_APM_SECRET_TOKEN}
processors:
batch: {}
resource:
attributes:
- key: deployment.environment
value: "opentelemetry-demo"
action: upsert
receivers:
httpcheck/frontendproxy:
targets:
- endpoint: http://example-frontendproxy:8080
otlp:
protocols:
grpc:
endpoint: ${env:MY_POD_IP}:4317
http:
cors:
allowed_origins:
- http://*
- https://*
endpoint: ${env:MY_POD_IP}:4318
service:
extensions:
- health_check
pipelines:
logs:
exporters:
- debug
- otlp/elastic
processors:
- batch
- resource
receivers:
- otlp
metrics:
exporters:
- otlp/elastic
- debug
processors:
- batch
- resource
receivers:
- httpcheck/frontendproxy
- otlp
- spanmetrics
traces:
exporters:
- otlp/elastic
- debug
- spanmetrics
processors:
- batch
- resource
receivers:
- otlp
telemetry:
metrics:
address: ${env:MY_POD_IP}:8888
opensearch:
enabled: false
grafana:
enabled: false
jaeger:
enabled: false
prometheus:
enabled: false