di 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534
  1. 9,12c9
  2. < mode: ""
  3. <
  4. < # Specify which namespace should be used to deploy the resources into
  5. < namespaceOverride: ""
  6. ---
  7. > mode: "daemonset"
  8. 28d24
  9. < # See https://opentelemetry.io/docs/kubernetes/collector/components/#filelog-receiver for details on the receiver.
  10. 35,37d30
  11. < # The maximum bytes size of the recombined field.
  12. < # Once the size exceeds the limit, all received entries of the source will be combined and flushed.
  13. < maxRecombineLogSize: 102400
  14. 42d34
  15. < # See https://opentelemetry.io/docs/kubernetes/collector/components/#host-metrics-receiver for details on the receiver.
  16. 49d40
  17. < # See https://opentelemetry.io/docs/kubernetes/collector/components/#kubernetes-attributes-processor for details on the receiver.
  18. 51,71c42
  19. < enabled: false
  20. < # When enabled the processor will extra all labels for an associated pod and add them as resource attributes.
  21. < # The label's exact name will be the key.
  22. < extractAllPodLabels: false
  23. < # When enabled the processor will extra all annotations for an associated pod and add them as resource attributes.
  24. < # The annotation's exact name will be the key.
  25. < extractAllPodAnnotations: false
  26. < # Configures the collector to collect node, pod, and container metrics from the API server on a kubelet..
  27. < # Adds the kubeletstats receiver to the metrics pipeline
  28. < # and adds the necessary rules to ClusteRole.
  29. < # Best used with mode = daemonset.
  30. < # See https://opentelemetry.io/docs/kubernetes/collector/components/#kubeletstats-receiver for details on the receiver.
  31. < kubeletMetrics:
  32. < enabled: false
  33. < # Configures the collector to collect kubernetes events.
  34. < # Adds the k8sobject receiver to the logs pipeline
  35. < # and collects kubernetes events by default.
  36. < # Best used with mode = deployment or statefulset.
  37. < # See https://opentelemetry.io/docs/kubernetes/collector/components/#kubernetes-objects-receiver for details on the receiver.
  38. < kubernetesEvents:
  39. < enabled: false
  40. ---
  41. > enabled: true
  42. 76d46
  43. < # See https://opentelemetry.io/docs/kubernetes/collector/components/#kubernetes-cluster-receiver for details on the receiver.
  44. 78a49,54
  45. > # Configures the collector to collect Kubelet metrics.
  46. > # Adds the kubeletstats receiver to the metrics pipeline
  47. > # and adds the necessary rules to ClusteRole.
  48. > # Best used with mode = daemonset.
  49. > kubeletMetrics:
  50. > enabled: false
  51. 83,85d58
  52. < # Specifies an existing ConfigMap to be mounted to the pod
  53. < # The ConfigMap MUST include the collector configuration via a key named 'relay' or the collector will not start.
  54. < existingName: ""
  55. 92c65,152
  56. < debug: {}
  57. ---
  58. > loki:
  59. > endpoint: http://loki-loki-distributed-gateway.observe.svc.cluster.local:80/loki/api/v1/push
  60. > otlphttp/deepflow:
  61. > traces_endpoint: "http://deepflow-agent.deepflow/api/v1/otel/trace"
  62. > tls:
  63. > insecure: true
  64. > retry_on_failure:
  65. > enabled: true
  66. > otlphttp/uptrace:
  67. > #endpoint: http://39.106.74.84:34318
  68. > endpoint: http://uptrace.observe.svc.cluster.local:14318
  69. > tls:
  70. > insecure: true
  71. > headers:
  72. > # uptrace-dsn: 'http://project2_secret_token@39.106.74.84:34318/2'
  73. > uptrace-dsn: 'http://project2_secret_token@uptrace.observe.svc.cluster.local:14318/2'
  74. >
  75. > debug:
  76. > verbosity: detailed
  77. > otlp:
  78. > endpoint: "tempo-distributor.observe.svc.cluster.local:4317"
  79. > tls:
  80. > insecure: true
  81. > otlp/col2:
  82. > endpoint: "col-l1-collector.ob.svc.cluster.local:4317"
  83. > tls:
  84. > insecure: true
  85. > prometheus:
  86. > endpoint: "0.0.0.0:8889"
  87. > #namespace: default
  88. > clickhouse:
  89. > endpoint: "tcp://clickhouse-headless.observe.svc.cluster.local:9000?dial_timeout=10s&compress=lz4"
  90. > database: otel
  91. > username: default
  92. > password: "cecf@cestong.com"
  93. > ttl: 240h
  94. > #logs_table: otel_logs
  95. > #traces_table: otel_traces
  96. > #metrics_table: otel_metrics
  97. > timeout: 5s
  98. > retry_on_failure:
  99. > enabled: true
  100. > initial_interval: 5s
  101. > max_interval: 30s
  102. > max_elapsed_time: 300s
  103. > kafka:
  104. > brokers:
  105. > - kafka.observe.svc.cluster.local:9092
  106. > protocol_version: 2.0.0
  107. > encoding: otlp_proto
  108. > topic: otel
  109. > timeout: 5s
  110. > retry_on_failure:
  111. > enabled: true
  112. > initial_interval: 5s
  113. > max_interval: 30s
  114. > max_elapsed_time: 120s
  115. > producer:
  116. > max_message_bytes: 1000000
  117. > required_acks: 1
  118. > compression: lz4
  119. > sending_queue:
  120. > enabled: false
  121. > kafka/trace:
  122. > brokers:
  123. > - kafka.observe.svc.cluster.local:9092
  124. > protocol_version: 2.0.0
  125. > encoding: otlp_proto
  126. > topic: otel_trace
  127. > sending_queue:
  128. > enabled: false
  129. > kafka/metric:
  130. > brokers:
  131. > - kafka.observe.svc.cluster.local:9092
  132. > protocol_version: 2.0.0
  133. > encoding: otlp_proto
  134. > topic: otel_metric
  135. > kafka/log:
  136. > brokers:
  137. > - kafka.observe.svc.cluster.local:9092
  138. > protocol_version: 2.0.0
  139. > encoding: otlp_proto
  140. > topic: otel_log
  141. > #kafka:
  142. > #brokers:
  143. > #- kafka-0.kafka-svc.kafka.svc.cluster.local:9092
  144. > #topic: trace2
  145. > #encoding: "json"
  146. 97,99c157
  147. < health_check:
  148. < endpoint: ${env:MY_POD_IP}:13133
  149. < memory_ballast: {}
  150. ---
  151. > health_check: {}
  152. 101c159,187
  153. < batch: {}
  154. ---
  155. > filter/ottl:
  156. > error_mode: ignore
  157. > logs:
  158. > log_record:
  159. > - 'severity_number < SEVERITY_NUMBER_WARN'
  160. > #transform:
  161. > # error_mode: ignore
  162. > # log_statements:
  163. > # - context: log
  164. > # statements:
  165. > # - set(severity_number, SEVERITY_NUMBER_INFO) where IsString(body) and IsMatch(body, "(\\s|\\[)INFO(\\s|\\])")
  166. > # - set(severity_number, SEVERITY_NUMBER_WARN) where IsString(body) and IsMatch(body, "(\\s|\\[)WARN(\\s|\\])")
  167. > # - set(severity_number, SEVERITY_NUMBER_ERROR) where IsString(body) and IsMatch(body, "(\\s|\\[)ERROR(\\s|\\])")
  168. > # - set(severity_number, SEVERITY_NUMBER_INFO) where severity_number == SEVERITY_NUMBER_UNSPECIFIED
  169. > attributes:
  170. > actions:
  171. > - action: insert
  172. > key: loki.attribute.labels
  173. > value: log.iostream
  174. >
  175. > resource:
  176. > attributes:
  177. > - action: insert
  178. > key: loki.resource.labels
  179. > value: k8s.container.name, k8s.container.restart_count, k8s.deployment.name, k8s.namespace.name, k8s.pod.name, k8s.node.name, k8s.daemonset.name, service.name, k8s.pod.uid
  180. > batch:
  181. > send_batch_max_size: 1000
  182. > send_batch_size: 500
  183. > timeout: 5s
  184. 103c189,192
  185. < memory_limiter: null
  186. ---
  187. > memory_limiter:
  188. > check_interval: 1s
  189. > limit_percentage: 80
  190. > spike_limit_percentage: 30
  191. 105,112c194,198
  192. < jaeger:
  193. < protocols:
  194. < grpc:
  195. < endpoint: ${env:MY_POD_IP}:14250
  196. < thrift_http:
  197. < endpoint: ${env:MY_POD_IP}:14268
  198. < thrift_compact:
  199. < endpoint: ${env:MY_POD_IP}:6831
  200. ---
  201. > kafka:
  202. > brokers: kafka.observe.svc.cluster.local:9092
  203. > protocol_version: 2.0.0
  204. > topic: otel_agent
  205. > encoding: otlp_proto
  206. 116c202
  207. < endpoint: ${env:MY_POD_IP}:4317
  208. ---
  209. > endpoint: ${MY_POD_IP}:4317
  210. 118c204
  211. < endpoint: ${env:MY_POD_IP}:4318
  212. ---
  213. > endpoint: ${MY_POD_IP}:4318
  214. 126,128c212
  215. < - ${env:MY_POD_IP}:8888
  216. < zipkin:
  217. < endpoint: ${env:MY_POD_IP}:9411
  218. ---
  219. > - ${MY_POD_IP}:8888
  220. 132c216,218
  221. < address: ${env:MY_POD_IP}:8888
  222. ---
  223. > address: ${MY_POD_IP}:8888
  224. > logs:
  225. > level: "info"
  226. 135d220
  227. < - memory_ballast
  228. 139c224,227
  229. < - debug
  230. ---
  231. > - clickhouse
  232. > #- otlphttp/uptrace
  233. > #- kafka
  234. > #- otlp/col2
  235. 140a229
  236. > #- filter/ottl
  237. 145,153c234,246
  238. < metrics:
  239. < exporters:
  240. < - debug
  241. < processors:
  242. < - memory_limiter
  243. < - batch
  244. < receivers:
  245. < - otlp
  246. < - prometheus
  247. ---
  248. > #metrics:
  249. > #meexporters:
  250. > #me - clickhouse
  251. > #me - prometheus
  252. > #me #- otlphttp/uptrace
  253. > #me #- kafka
  254. > #me #- otlp/col2
  255. > #meprocessors:
  256. > #me - memory_limiter
  257. > #me - batch
  258. > #mereceivers:
  259. > #me - otlp
  260. > #me - prometheus
  261. 156c249,251
  262. < - debug
  263. ---
  264. > #- clickhouse
  265. > #- otlphttp/deepflow
  266. > - kafka
  267. 162,163c257
  268. < - jaeger
  269. < - zipkin
  270. ---
  271. > - kafka
  272. 167,170c261,265
  273. < repository: ""
  274. < pullPolicy: IfNotPresent
  275. < # Overrides the image tag whose default is the chart appVersion.
  276. < tag: ""
  277. ---
  278. > repository: otel/opentelemetry-collector-contrib
  279. > #repository: reg.cestong.com.cn/cecf/obcol
  280. > pullPolicy: Always
  281. > # tag: "latest"
  282. > tag: "0.108.0"
  283. 229c324
  284. < topologySpreadConstraints: []
  285. ---
  286. > topologySpreadConstraints: {}
  287. 235d329
  288. < extraEnvsFrom: []
  289. 246c340
  290. < hostPort: 4317
  291. ---
  292. > #hostPort: 4317
  293. 248c342
  294. < # nodePort: 30317
  295. ---
  296. > nodePort: 30317
  297. 254,272c348,349
  298. < hostPort: 4318
  299. < protocol: TCP
  300. < jaeger-compact:
  301. < enabled: true
  302. < containerPort: 6831
  303. < servicePort: 6831
  304. < hostPort: 6831
  305. < protocol: UDP
  306. < jaeger-thrift:
  307. < enabled: true
  308. < containerPort: 14268
  309. < servicePort: 14268
  310. < hostPort: 14268
  311. < protocol: TCP
  312. < jaeger-grpc:
  313. < enabled: true
  314. < containerPort: 14250
  315. < servicePort: 14250
  316. < hostPort: 14250
  317. ---
  318. > #hostPort: 4318
  319. > # nodePort: 30318
  320. 274c351
  321. < zipkin:
  322. ---
  323. > prome:
  324. 276,278c353,354
  325. < containerPort: 9411
  326. < servicePort: 9411
  327. < hostPort: 9411
  328. ---
  329. > containerPort: 8889
  330. > servicePort: 8889
  331. 283c359
  332. < enabled: false
  333. ---
  334. > enabled: true
  335. 289,295c365,373
  336. < resources: {}
  337. < # resources:
  338. < # limits:
  339. < # cpu: 250m
  340. < # memory: 512Mi
  341. <
  342. < podAnnotations: {}
  343. ---
  344. > resources:
  345. > limits:
  346. > cpu: 4
  347. > memory: 4096Mi
  348. >
  349. > podAnnotations:
  350. > prometheus.io/scrape: "true"
  351. > prometheus.io/path: /metrics
  352. > prometheus.io/port: "8889"
  353. 299,302d376
  354. < # Common labels to add to all otel-collector resources. Evaluated as a template.
  355. < additionalLabels: {}
  356. < # app.kubernetes.io/part-of: my-app
  357. <
  358. 306,312d379
  359. < # Adding entries to Pod /etc/hosts with HostAliases
  360. < # https://kubernetes.io/docs/tasks/network/customize-hosts-file-for-pods/
  361. < hostAliases: []
  362. < # - ip: "1.2.3.4"
  363. < # hostnames:
  364. < # - "my.host.com"
  365. <
  366. 316,318d382
  367. < # Custom DNS config. Required when DNS policy is None.
  368. < dnsConfig: {}
  369. <
  370. 327,328c391
  371. < # List of extra sidecars to add.
  372. < # This also supports template content, which will eventually be converted to yaml.
  373. ---
  374. > # List of extra sidecars to add
  375. 343d405
  376. < # This also supports template content, which will eventually be converted to yaml.
  377. 376,411d437
  378. < # liveness probe configuration
  379. < # Ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/
  380. < ##
  381. < livenessProbe:
  382. < # Number of seconds after the container has started before startup, liveness or readiness probes are initiated.
  383. < # initialDelaySeconds: 1
  384. < # How often in seconds to perform the probe.
  385. < # periodSeconds: 10
  386. < # Number of seconds after which the probe times out.
  387. < # timeoutSeconds: 1
  388. < # Minimum consecutive failures for the probe to be considered failed after having succeeded.
  389. < # failureThreshold: 1
  390. < # Duration in seconds the pod needs to terminate gracefully upon probe failure.
  391. < # terminationGracePeriodSeconds: 10
  392. < httpGet:
  393. < port: 13133
  394. < path: /
  395. <
  396. < # readiness probe configuration
  397. < # Ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/
  398. < ##
  399. < readinessProbe:
  400. < # Number of seconds after the container has started before startup, liveness or readiness probes are initiated.
  401. < # initialDelaySeconds: 1
  402. < # How often (in seconds) to perform the probe.
  403. < # periodSeconds: 10
  404. < # Number of seconds after which the probe times out.
  405. < # timeoutSeconds: 1
  406. < # Minimum consecutive successes for the probe to be considered successful after having failed.
  407. < # successThreshold: 1
  408. < # Minimum consecutive failures for the probe to be considered failed after having succeeded.
  409. < # failureThreshold: 1
  410. < httpGet:
  411. < port: 13133
  412. < path: /
  413. <
  414. 413,418c439,440
  415. < # Enable the creation of a Service.
  416. < # By default, it's enabled on mode != daemonset.
  417. < # However, to enable it on mode = daemonset, its creation must be explicitly enabled
  418. < # enabled: true
  419. <
  420. < type: ClusterIP
  421. ---
  422. > #type: ClusterIP
  423. > type: NodePort
  424. 422,427d443
  425. <
  426. < # By default, Service of type 'LoadBalancer' will be created setting 'externalTrafficPolicy: Cluster'
  427. < # unless other value is explicitly set.
  428. < # Possible values are Cluster or Local (https://kubernetes.io/docs/tasks/access-application-cluster/create-external-load-balancer/#preserving-the-client-source-ip)
  429. < # externalTrafficPolicy: Cluster
  430. <
  431. 430,434d445
  432. < # By default, Service will be created setting 'internalTrafficPolicy: Local' on mode = daemonset
  433. < # unless other value is explicitly set.
  434. < # Setting 'internalTrafficPolicy: Cluster' on a daemonset is not recommended
  435. < # internalTrafficPolicy: Cluster
  436. <
  437. 436,444c447,461
  438. < enabled: false
  439. < # annotations: {}
  440. < # ingressClassName: nginx
  441. < # hosts:
  442. < # - host: collector.example.com
  443. < # paths:
  444. < # - path: /
  445. < # pathType: Prefix
  446. < # port: 4318
  447. ---
  448. > enabled: true
  449. > annotations:
  450. > nginx.ingress.kubernetes.io/cors-allow-origin: "http://otel-demo.cestong.com.cn,http://localhost:3000,http://localhost:1234,http://localhost:5678,http://observe-front.cestong.com.cn"
  451. > nginx.ingress.kubernetes.io/enable-cors: "true"
  452. > nginx.ingress.kubernetes.io/cors-allow-headers: "*"
  453. > nginx.ingress.kubernetes.io/cors-allow-methods: "*"
  454. > nginx.ingress.kubernetes.io/cors-allow-credentials: "true"
  455. >
  456. > ingressClassName: nginx
  457. > hosts:
  458. > - host: otel-collector.cestong.com.cn
  459. > paths:
  460. > - path: /
  461. > pathType: Prefix
  462. > port: 4318
  463. 498c515
  464. < # autoscaling is used only if mode is "deployment" or "statefulset"
  465. ---
  466. > # autoscaling is used only if deployment enabled
  467. 503d519
  468. < behavior: {}
  469. 528,592d543
  470. < # Controls if and how PVCs created by the StatefulSet are deleted. Available in Kubernetes 1.23+.
  471. < persistentVolumeClaimRetentionPolicy:
  472. < enabled: false
  473. < whenDeleted: Retain
  474. < whenScaled: Retain
  475. <
  476. < networkPolicy:
  477. < enabled: false
  478. <
  479. < # Annotations to add to the NetworkPolicy
  480. < annotations: {}
  481. <
  482. < # Configure the 'from' clause of the NetworkPolicy.
  483. < # By default this will restrict traffic to ports enabled for the Collector. If
  484. < # you wish to further restrict traffic to other hosts or specific namespaces,
  485. < # see the standard NetworkPolicy 'spec.ingress.from' definition for more info:
  486. < # https://kubernetes.io/docs/reference/kubernetes-api/policy-resources/network-policy-v1/
  487. < allowIngressFrom: []
  488. < # # Allow traffic from any pod in any namespace, but not external hosts
  489. < # - namespaceSelector: {}
  490. < # # Allow external access from a specific cidr block
  491. < # - ipBlock:
  492. < # cidr: 192.168.1.64/32
  493. < # # Allow access from pods in specific namespaces
  494. < # - namespaceSelector:
  495. < # matchExpressions:
  496. < # - key: kubernetes.io/metadata.name
  497. < # operator: In
  498. < # values:
  499. < # - "cats"
  500. < # - "dogs"
  501. <
  502. < # Add additional ingress rules to specific ports
  503. < # Useful to allow external hosts/services to access specific ports
  504. < # An example is allowing an external prometheus server to scrape metrics
  505. < #
  506. < # See the standard NetworkPolicy 'spec.ingress' definition for more info:
  507. < # https://kubernetes.io/docs/reference/kubernetes-api/policy-resources/network-policy-v1/
  508. < extraIngressRules: []
  509. < # - ports:
  510. < # - port: metrics
  511. < # protocol: TCP
  512. < # from:
  513. < # - ipBlock:
  514. < # cidr: 192.168.1.64/32
  515. <
  516. < # Restrict egress traffic from the OpenTelemetry collector pod
  517. < # See the standard NetworkPolicy 'spec.egress' definition for more info:
  518. < # https://kubernetes.io/docs/reference/kubernetes-api/policy-resources/network-policy-v1/
  519. < egressRules: []
  520. < # - to:
  521. < # - namespaceSelector: {}
  522. < # - ipBlock:
  523. < # cidr: 192.168.10.10/24
  524. < # ports:
  525. < # - port: 1234
  526. < # protocol: TCP
  527. <
  528. < # When enabled, the chart will set the GOMEMLIMIT env var to 80% of the configured
  529. < # resources.limits.memory and remove the memory ballast extension.
  530. < # If no resources.limits.memory are defined enabling does nothing.
  531. < # In a future release this setting will be enabled by default.
  532. < # See https://github.com/open-telemetry/opentelemetry-helm-charts/issues/891
  533. < # for more details.
  534. < useGOMEMLIMIT: true