apiVersion: apps/v1
kind: Deployment
metadata:
  name: sc4-snmp-otel
  labels:
    app: sc4-snmp-otel
spec:
  replicas: 1
  selector:
    matchLabels:
      app: sc4-snmp-otel
  template:
    metadata:
      labels:
        app: sc4-snmp-otel
    spec:
      containers:
        - name: otel-collector
          image: quay.io/signalfx/splunk-otel-collector:0.21.0
          args: ["--config=/config/otel-collector-config.yaml"]
          env:
            - name: SPLUNK_HEC_URL
              valueFrom:
                secretKeyRef:
                  name: remote-splunk
                  key: SPLUNK_HEC_URL
            - name: SPLUNK_HEC_TOKEN
              valueFrom:
                secretKeyRef:
                  name: remote-splunk
                  key: SPLUNK_HEC_TOKEN
            - name: SPLUNK_HEC_TLS_SKIP_VERIFY
              valueFrom:
                secretKeyRef:
                  name: remote-splunk
                  key: SPLUNK_HEC_TLS_SKIP_VERIFY
          ports:
            - containerPort: 8881
            - containerPort: 8882
          volumeMounts:
            - name: config
              mountPath: "/config"
              readOnly: true
      volumes:
         - name: config
           configMap:
             name: sc4snmp-otel
             items:
               - key: "otel-collector-config.yaml"
                 path: "otel-collector-config.yaml"


