apiVersion: apps/v1
kind: Deployment
metadata:
  name: eraser-metrics
  labels:
    app.kubernetes.io/controller: main
    app.kubernetes.io/instance: eraser
    app.kubernetes.io/managed-by: Helm
    app.kubernetes.io/name: eraser-metrics
    helm.sh/chart: eraser-metrics-5.0.1
  namespace: eraser
spec:
  revisionHistoryLimit: 3
  replicas: 1
  strategy:
    type: Recreate
  selector:
    matchLabels:
      app.kubernetes.io/controller: main
      app.kubernetes.io/name: eraser-metrics
      app.kubernetes.io/instance: eraser
  template:
    metadata:
      annotations:
        checksum/configMaps: 99c74a4734ce3f4e4e91c516068ad606c1095d48c5049b2f51f1231db31e0122
      labels:
        app.kubernetes.io/controller: main
        app.kubernetes.io/instance: eraser
        app.kubernetes.io/name: eraser-metrics
    spec:
      enableServiceLinks: false
      serviceAccountName: eraser-metrics
      automountServiceAccountToken: false
      hostIPC: false
      hostNetwork: false
      hostPID: false
      dnsPolicy: ClusterFirst
      containers:
        - command:
            - /otelcol
            - --config=/conf/otel-collector-config.yaml
          image: ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector:0.152.1@sha256:c5cde41675a68e392322140d25fa232b4585e4e7fdc5f8c39d61d968bc13dae6
          name: main
          resources:
            requests:
              cpu: 10m
              memory: 20Mi
          volumeMounts:
            - mountPath: /conf/otel-collector-config.yaml
              mountPropagation: None
              name: config
              readOnly: true
              subPath: otel-collector-config.yaml
      volumes:
        - configMap:
            name: eraser-config
          name: config
