values.yaml 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445
  1. # Default values for opentelemetry-collector.
  2. # This is a YAML-formatted file.
  3. # Declare variables to be passed into your templates.
  4. nameOverride: ""
  5. fullnameOverride: ""
  6. # Valid values are "daemonset", "deployment", and "statefulset".
  7. mode: "daemonset"
  8. presets:
  9. logsCollection:
  10. enabled: false
  11. includeCollectorLogs: false
  12. # Enabling this writes checkpoints in /var/lib/otelcol/ host directory.
  13. # Note this changes collector's user to root, so that it can write to host directory.
  14. storeCheckpoints: false
  15. # Configures the collector to collect host metrics.
  16. # Adds the hostmetrics receiver to the metrics pipeline
  17. # and adds the necessary volumes and volume mounts.
  18. # Best used with mode = daemonset.
  19. hostMetrics:
  20. enabled: false
  21. # Configures the Kubernetes Processor to add Kubernetes metadata.
  22. # Adds the k8sattributes processor to all the pipelines
  23. # and adds the necessary rules to ClusteRole.
  24. # Best used with mode = daemonset.
  25. kubernetesAttributes:
  26. enabled: true
  27. # Configures the Kubernetes Cluster Receiver to collect cluster-level metrics.
  28. # Adds the k8s_cluster receiver to the metrics pipeline
  29. # and adds the necessary rules to ClusteRole.
  30. # Best used with mode = deployment or statefulset.
  31. clusterMetrics:
  32. enabled: false
  33. # Configures the collector to collect Kubelet metrics.
  34. # Adds the kubeletstats receiver to the metrics pipeline
  35. # and adds the necessary rules to ClusteRole.
  36. # Best used with mode = daemonset.
  37. kubeletMetrics:
  38. enabled: false
  39. configMap:
  40. # Specifies whether a configMap should be created (true by default)
  41. create: true
  42. # Base collector configuration.
  43. # Supports templating. To escape existing instances of {{ }}, use {{` <original content> `}}.
  44. # For example, {{ REDACTED_EMAIL }} becomes {{` {{ REDACTED_EMAIL }} `}}.
  45. config:
  46. exporters:
  47. loki:
  48. endpoint: http://loki-loki-distributed-gateway.observe.svc.cluster.local:80/loki/api/v1/push
  49. otlphttp/deepflow:
  50. traces_endpoint: "http://deepflow-agent.deepflow/api/v1/otel/trace"
  51. tls:
  52. insecure: true
  53. retry_on_failure:
  54. enabled: true
  55. otlphttp/uptrace:
  56. #endpoint: http://39.106.74.84:34318
  57. endpoint: http://uptrace.observe.svc.cluster.local:14318
  58. tls:
  59. insecure: true
  60. headers:
  61. # uptrace-dsn: 'http://project2_secret_token@39.106.74.84:34318/2'
  62. uptrace-dsn: 'http://project2_secret_token@uptrace.observe.svc.cluster.local:14318/2'
  63. debug:
  64. verbosity: detailed
  65. otlp:
  66. endpoint: "tempo-distributor.observe.svc.cluster.local:4317"
  67. tls:
  68. insecure: true
  69. prometheus:
  70. endpoint: "0.0.0.0:8889"
  71. clickhouse:
  72. endpoint: "tcp://clickhouse-headless.observe.svc.cluster.local:9000?dial_timeout=10s&compress=lz4"
  73. database: otel
  74. username: default
  75. password: "cecf@cestong.com"
  76. ttl: 240h
  77. #logs_table: otel_logs
  78. #traces_table: otel_traces
  79. #metrics_table: otel_metrics
  80. timeout: 5s
  81. retry_on_failure:
  82. enabled: true
  83. initial_interval: 5s
  84. max_interval: 30s
  85. max_elapsed_time: 300s
  86. kafka/proto:
  87. brokers:
  88. - kafka-headless.observe.svc.cluster.local:9092
  89. protocol_version: 2.0.0
  90. encoding: otlp_proto
  91. topic: otelproto
  92. timeout: 5s
  93. retry_on_failure:
  94. enabled: true
  95. initial_interval: 5s
  96. max_interval: 30s
  97. max_elapsed_time: 120s
  98. producer:
  99. max_message_bytes: 1000000
  100. required_acks: 1
  101. compression: lz4
  102. sending_queue:
  103. enabled: false
  104. kafka:
  105. brokers:
  106. - kafka-headless.observe.svc.cluster.local:9092
  107. #- kafka-broker.ob.svc.cluster.local:9092
  108. protocol_version: 2.0.0
  109. encoding: otlp_json
  110. topic: otel
  111. timeout: 5s
  112. retry_on_failure:
  113. enabled: true
  114. initial_interval: 5s
  115. max_interval: 30s
  116. max_elapsed_time: 120s
  117. producer:
  118. max_message_bytes: 1000000
  119. required_acks: 1
  120. compression: lz4
  121. flush_max_messages: 5000
  122. sending_queue:
  123. enabled: false
  124. extensions:
  125. health_check:
  126. endpoint: "0.0.0.0:13133"
  127. processors:
  128. filter/ottl:
  129. error_mode: ignore
  130. logs:
  131. log_record:
  132. - 'severity_number < SEVERITY_NUMBER_WARN'
  133. #transform:
  134. # error_mode: ignore
  135. # log_statements:
  136. # - context: log
  137. # statements:
  138. # - set(severity_number, SEVERITY_NUMBER_INFO) where IsString(body) and IsMatch(body, "(\\s|\\[)INFO(\\s|\\])")
  139. # - set(severity_number, SEVERITY_NUMBER_WARN) where IsString(body) and IsMatch(body, "(\\s|\\[)WARN(\\s|\\])")
  140. # - set(severity_number, SEVERITY_NUMBER_ERROR) where IsString(body) and IsMatch(body, "(\\s|\\[)ERROR(\\s|\\])")
  141. # - set(severity_number, SEVERITY_NUMBER_INFO) where severity_number == SEVERITY_NUMBER_UNSPECIFIED
  142. attributes:
  143. actions:
  144. - action: insert
  145. key: loki.attribute.labels
  146. value: log.iostream
  147. resource:
  148. attributes:
  149. - action: insert
  150. key: loki.resource.labels
  151. 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
  152. batch:
  153. send_batch_max_size: 1000
  154. send_batch_size: 500
  155. timeout: 5s
  156. # If set to null, will be overridden with values based on k8s resource limits
  157. memory_limiter:
  158. check_interval: 1s
  159. limit_percentage: 80
  160. spike_limit_percentage: 30
  161. receivers:
  162. kafka:
  163. brokers: kafka-headless.observe.svc.cluster.local:9092
  164. protocol_version: 2.0.0
  165. topic: otel_agent
  166. encoding: otlp_proto
  167. otlp:
  168. protocols:
  169. grpc:
  170. endpoint: ${MY_POD_IP}:4317
  171. http:
  172. endpoint: ${MY_POD_IP}:4318
  173. prometheus:
  174. config:
  175. scrape_configs:
  176. - job_name: opentelemetry-collector
  177. scrape_interval: 10s
  178. static_configs:
  179. - targets:
  180. - ${MY_POD_IP}:8888
  181. service:
  182. telemetry:
  183. metrics:
  184. address: ${MY_POD_IP}:8888
  185. logs:
  186. level: "info"
  187. extensions:
  188. - health_check
  189. pipelines:
  190. metrics:
  191. receivers:
  192. - otlp
  193. - prometheus
  194. processors:
  195. - memory_limiter
  196. exporters:
  197. - prometheus
  198. #- clickhouse
  199. logs:
  200. exporters:
  201. - clickhouse
  202. processors:
  203. #- filter/ottl
  204. - memory_limiter
  205. - batch
  206. receivers:
  207. - otlp
  208. traces:
  209. exporters:
  210. - kafka/proto
  211. processors:
  212. - memory_limiter
  213. #- batch
  214. receivers:
  215. - otlp
  216. - kafka
  217. image:
  218. repository: otel/opentelemetry-collector-contrib
  219. #repository: reg.cestong.com.cn/cecf/obcol
  220. pullPolicy: Always
  221. tag: "0.108.0"
  222. digest: ""
  223. imagePullSecrets: []
  224. # OpenTelemetry Collector executable
  225. command:
  226. name: ""
  227. extraArgs: []
  228. serviceAccount:
  229. # Specifies whether a service account should be created
  230. create: true
  231. # Annotations to add to the service account
  232. annotations: {}
  233. # The name of the service account to use.
  234. # If not set and create is true, a name is generated using the fullname template
  235. name: ""
  236. clusterRole:
  237. # Specifies whether a clusterRole should be created
  238. # Some presets also trigger the creation of a cluster role and cluster role binding.
  239. # If using one of those presets, this field is no-op.
  240. create: false
  241. # Annotations to add to the clusterRole
  242. # Can be used in combination with presets that create a cluster role.
  243. annotations: {}
  244. # The name of the clusterRole to use.
  245. # If not set a name is generated using the fullname template
  246. # Can be used in combination with presets that create a cluster role.
  247. name: ""
  248. # A set of rules as documented here : https://kubernetes.io/docs/reference/access-authn-authz/rbac/
  249. # Can be used in combination with presets that create a cluster role to add additional rules.
  250. rules: []
  251. # - apiGroups:
  252. # - ''
  253. # resources:
  254. # - 'pods'
  255. # - 'nodes'
  256. # verbs:
  257. # - 'get'
  258. # - 'list'
  259. # - 'watch'
  260. clusterRoleBinding:
  261. annotations: {}
  262. name: ""
  263. podSecurityContext: {}
  264. securityContext: {}
  265. nodeSelector: {}
  266. tolerations: []
  267. affinity: {}
  268. topologySpreadConstraints: {}
  269. priorityClassName: ""
  270. extraEnvs: []
  271. extraVolumes: []
  272. extraVolumeMounts: []
  273. ports:
  274. health:
  275. enabled: true
  276. containerPort: 13133
  277. servicePort: 13133
  278. protocol: TCP
  279. otlp:
  280. enabled: true
  281. containerPort: 4317
  282. servicePort: 4317
  283. #hostPort: 4317
  284. protocol: TCP
  285. nodePort: 30317
  286. appProtocol: grpc
  287. otlp-http:
  288. enabled: true
  289. containerPort: 4318
  290. servicePort: 4318
  291. #hostPort: 4318
  292. # nodePort: 30318
  293. protocol: TCP
  294. prome:
  295. enabled: true
  296. containerPort: 8889
  297. servicePort: 8889
  298. protocol: TCP
  299. metrics:
  300. enabled: true
  301. containerPort: 8888
  302. servicePort: 8888
  303. protocol: TCP
  304. # Resource limits & requests. Update according to your own use case as these values might be too low for a typical deployment.
  305. resources:
  306. limits:
  307. cpu: 4
  308. memory: 4096Mi
  309. podAnnotations:
  310. prometheus.io/scrape: "true"
  311. prometheus.io/path: /metrics
  312. prometheus.io/port: "8889"
  313. podLabels: {}
  314. # Host networking requested for this pod. Use the host's network namespace.
  315. hostNetwork: false
  316. # Pod DNS policy ClusterFirst, ClusterFirstWithHostNet, None, Default, None
  317. dnsPolicy: ""
  318. # only used with deployment mode
  319. replicaCount: 1
  320. # only used with deployment mode
  321. revisionHistoryLimit: 10
  322. annotations: {}
  323. # List of extra sidecars to add
  324. extraContainers: []
  325. # extraContainers:
  326. # - name: test
  327. # command:
  328. # - cp
  329. # args:
  330. # - /bin/sleep
  331. # - /test/sleep
  332. # image: busybox:latest
  333. # volumeMounts:
  334. # - name: test
  335. # mountPath: /test
  336. # List of init container specs, e.g. for copying a binary to be executed as a lifecycle hook.
  337. # Another usage of init containers is e.g. initializing filesystem permissions to the OTLP Collector user `10001` in case you are using persistence and the volume is producing a permission denied error for the OTLP Collector container.
  338. initContainers: []
  339. lifecycleHooks: {}
  340. service:
  341. type: NodePort
  342. annotations: {}
  343. ingress:
  344. enabled: true
  345. annotations:
  346. 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"
  347. nginx.ingress.kubernetes.io/enable-cors: "true"
  348. nginx.ingress.kubernetes.io/cors-allow-headers: "*"
  349. nginx.ingress.kubernetes.io/cors-allow-methods: "*"
  350. nginx.ingress.kubernetes.io/cors-allow-credentials: "true"
  351. ingressClassName: nginx
  352. hosts:
  353. - host: otel-collector.cestong.com.cn
  354. paths:
  355. - path: /
  356. pathType: Prefix
  357. port: 4318
  358. additionalIngresses: []
  359. podMonitor:
  360. enabled: false
  361. metricsEndpoints:
  362. - port: metrics
  363. # interval: 15s
  364. # additional labels for the PodMonitor
  365. extraLabels: {}
  366. # release: kube-prometheus-stack
  367. serviceMonitor:
  368. # The service monitor by default scrapes the metrics port.
  369. # The metrics port needs to be enabled as well.
  370. enabled: false
  371. metricsEndpoints:
  372. - port: metrics
  373. # interval: 15s
  374. # additional labels for the ServiceMonitor
  375. extraLabels: {}
  376. # release: kube-prometheus-stack
  377. # PodDisruptionBudget is used only if deployment enabled
  378. podDisruptionBudget:
  379. enabled: false
  380. # minAvailable: 2
  381. # maxUnavailable: 1
  382. # autoscaling is used only if deployment enabled
  383. autoscaling:
  384. enabled: false
  385. minReplicas: 1
  386. maxReplicas: 10
  387. targetCPUUtilizationPercentage: 80
  388. # targetMemoryUtilizationPercentage: 80
  389. rollout:
  390. rollingUpdate: {}
  391. # When 'mode: daemonset', maxSurge cannot be used when hostPort is set for any of the ports
  392. # maxSurge: 25%
  393. # maxUnavailable: 0
  394. strategy: RollingUpdate
  395. prometheusRule:
  396. enabled: false
  397. groups: []
  398. # Create default rules for monitoring the collector
  399. defaultRules:
  400. enabled: false
  401. # additional labels for the PrometheusRule
  402. extraLabels: {}
  403. statefulset:
  404. # volumeClaimTemplates for a statefulset
  405. volumeClaimTemplates: []
  406. podManagementPolicy: "Parallel"