apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    app.kubernetes.io/name: otel-collector
  name: otel-collector
spec:
  replicas: 1
  selector:
    matchLabels:
      app.kubernetes.io/name: otel-collector
  template:
    metadata:
      annotations:
        prometheus.io/path: /metrics
        prometheus.io/port: "8888"
        prometheus.io/scrape: "true"
      labels:
        app.kubernetes.io/name: otel-collector
    spec:
      containers:
        - name: otel-collector
          image: otel/opentelemetry-collector-contrib:0.9.0
          #image: localhost:5000/otelcontribcol
          args:
            - --config
            - /etc/otel/config.yaml
            - --log-level=DEBUG
          ports:
            - containerPort: 55678 # OpenCensus
            - containerPort: 55680 # OpenTelemetry
            - containerPort: 9411 # Zipkin
          livenessProbe:
            httpGet:
              path: /
              port: 13133
          readinessProbe:
            httpGet:
              path: /
              port: 13133
          volumeMounts:
            - mountPath: /etc/otel
              name: config
      volumes:
        - name: config
          configMap:
            name: otel-collector
