# ============================================================================= # OpenTelemetry Collector (DaemonSet) — PaaSup 커스텀 오버라이드 # 차트: open-telemetry/opentelemetry-collector # 배포: DaemonSet (모든 노드에서 파드 로그 수집) # 릴리스명: otelcol # # 파이프라인 (로그 전용): # logs/demo01 : filelog → filter(namespace=demo01-*) → vlinsert AccountID 1 # logs/demo02 : filelog → filter(namespace=demo02-*) → vlinsert AccountID 2 # logs/platform: filelog → filter(나머지) → vlinsert AccountID 0 # # 참고: K8s 이벤트 수집은 Deployment 모드의 custom-values-events.yaml로 별도 배포. # ============================================================================= mode: daemonset image: repository: otel/opentelemetry-collector-contrib # 로그 전용 — 차트 기본 trace/OTLP 인바운드 포트 비활성화 (filelog는 호스트 파일을 읽음) ports: otlp: enabled: false otlp-http: enabled: false jaeger-compact: enabled: false jaeger-thrift: enabled: false jaeger-grpc: enabled: false zipkin: enabled: false resources: requests: cpu: 100m memory: 256Mi limits: cpu: 500m memory: 512Mi # 호스트 로그 접근 extraVolumes: - name: varlogpods hostPath: path: /var/log/pods - name: varlibdockercontainers hostPath: path: /var/lib/docker/containers extraVolumeMounts: - name: varlogpods mountPath: /var/log/pods readOnly: true - name: varlibdockercontainers mountPath: /var/lib/docker/containers readOnly: true config: # 차트 기본 트레이스/메트릭 컴포넌트 제거 (로그 전용 collector) receivers: jaeger: null zipkin: null otlp: null prometheus: null filelog: include: - /var/log/pods/*/*/*.log exclude: - /var/log/pods/monitoring_otelcol*/*/*.log start_at: end include_file_path: true include_file_name: false operators: - type: router id: get-format routes: - output: parser-docker expr: 'body matches "^\\{"' - output: parser-crio expr: 'body matches "^[^ ]+ "' - type: json_parser id: parser-docker output: extract-metadata-from-filepath - type: regex_parser id: parser-crio regex: '^(?P