apiVersion: apps/v1 kind: DaemonSet metadata: name: otel-agent spec: selector: matchLabels: {app.kubernetes.io/name: otel-agent} updateStrategy: type: RollingUpdate rollingUpdate: {maxUnavailable: 1} template: metadata: labels: app.kubernetes.io/name: otel-agent sidecar.istio.io/inject: "false" annotations: sidecar.istio.io/inject: "false" spec: serviceAccountName: otel-agent nodeSelector: {kubernetes.io/os: linux} tolerations: - {operator: Exists} imagePullSecrets: - name: regcred terminationGracePeriodSeconds: 60 securityContext: runAsUser: 0 runAsGroup: 0 seccompProfile: {type: RuntimeDefault} containers: - name: otel-agent image: cr.yandex/crp3ccidau046kdj8g9q/opentelemetry-collector/opentelemetry-collector-contrib:0.121.0-amd64 args: ["--config=/etc/otelcol/config.yaml"] env: - name: K8S_NODE_NAME valueFrom: {fieldRef: {fieldPath: spec.nodeName}} ports: - {name: health, containerPort: 13133} - {name: metrics, containerPort: 8888} readinessProbe: httpGet: {path: /, port: health} livenessProbe: httpGet: {path: /, port: health} resources: requests: {cpu: 100m, memory: 256Mi} limits: {cpu: "1", memory: 768Mi} securityContext: runAsNonRoot: false readOnlyRootFilesystem: true allowPrivilegeEscalation: false capabilities: {drop: [ALL]} volumeMounts: - {name: config, mountPath: /etc/otelcol, readOnly: true} - {name: pod-logs, mountPath: /var/log/pods, readOnly: true} - {name: storage, mountPath: /var/lib/otelcol-service-logs} volumes: - name: config configMap: {name: otel-agent-config} - name: pod-logs hostPath: {path: /var/log/pods, type: Directory} - name: storage hostPath: {path: /var/lib/otelcol-service-logs, type: DirectoryOrCreate}