apiVersion: apps/v1
kind: DaemonSet
metadata:
  name: jaeger-agent
  labels:
    app: jaeger
    app.kubernetes.io/name: jaeger
    app.kubernetes.io/component: agent
spec:
  selector:
    matchLabels:
      app: jaeger
      app.kubernetes.io/name: jaeger
      app.kubernetes.io/component: agent
  template:
    metadata:
      labels:
        app: jaeger
        app.kubernetes.io/name: jaeger
        app.kubernetes.io/component: agent
      annotations:
        prometheus.io/scrape: "true"
        prometheus.io/port: "14271"
    spec:
      containers:
      - name: jaeger-agent
        image: jaegertracing/jaeger-agent:1.18.1
        args: ["--config-file=/conf/agent.yaml"]
        volumeMounts:
        - name: jaeger-configuration-volume
          mountPath: /conf
        ports:
        - containerPort: 5775
          protocol: UDP
        - containerPort: 6831
          protocol: UDP
        - containerPort: 6832
          protocol: UDP
        - containerPort: 5778
          protocol: TCP
        - containerPort: 14271
          name: admin-http
          protocol: TCP
      hostNetwork: true
      dnsPolicy: ClusterFirstWithHostNet
      volumes:
        - configMap:
            name: jaeger-configuration
            items:
              - key: agent
                path: agent.yaml
          name: jaeger-configuration-volume