apiVersion: apps/v1
kind: Deployment
metadata:
  name: telegraf
  labels:
      app: telegraf
spec:
  selector:
    matchLabels:
      app: telegraf
  replicas: 1
  strategy:
    type: Recreate
  minReadySeconds: 5
  template:
    metadata:
      name: telegraf
      labels:
        app: telegraf
    spec:
      containers:
        - name: telegraf
          image: telegraf-image
          imagePullPolicy: Never
          volumeMounts:
            - name: docker-socket
              mountPath: /var/run/docker.sock
      volumes:
        - name: docker-socket
          hostPath:
            path: /var/run/docker.sock
            type: Socket