apiVersion: apps/v1
kind: Deployment
metadata:
  name: telegraf-deployment
spec:
  selector:
    matchLabels:
      app: telegraf
  minReadySeconds: 5
  template:
    metadata:
      labels:
        app: telegraf
    spec:
      containers:
        - image: anveshvemula/dlt_telegraf:v1
          name: telegraf
          volumeMounts:
            - mountPath: /etc/telegraf/telegraf.conf
              name: telegraf-config
              subPath: telegraf.conf
              readOnly: true
          envFrom:
            - secretRef:
                name: telegraf-secrets
      volumes:
        - name: telegraf-config
          configMap:
            name: telegraf-config
