apiVersion: apps/v1
kind: DaemonSet
metadata:
  labels:
    app.kubernetes.io/instance: RELEASE-NAME
    app.kubernetes.io/managed-by: Helm
    app.kubernetes.io/name: promtail
    app.kubernetes.io/version: 2.4.2
    helm.sh/chart: promtail-3.10.0
  name: RELEASE-NAME-promtail
  namespace: default
spec:
  selector:
    matchLabels:
      app.kubernetes.io/instance: RELEASE-NAME
      app.kubernetes.io/name: promtail
  template:
    metadata:
      annotations:
        checksum/config: 4c015bfd8a556d9992f96b7277da353b4e2362e934ff188682a8e08099c66d4f
      labels:
        app.kubernetes.io/instance: RELEASE-NAME
        app.kubernetes.io/name: promtail
    spec:
      containers:
      - args:
        - -config.file=/etc/promtail/promtail.yaml
        env:
        - name: HOSTNAME
          valueFrom:
            fieldRef:
              fieldPath: spec.nodeName
        image: docker.io/grafana/promtail:2.4.2
        imagePullPolicy: IfNotPresent
        name: promtail
        ports:
        - containerPort: 3101
          name: http-metrics
          protocol: TCP
        readinessProbe:
          failureThreshold: 5
          httpGet:
            path: /ready
            port: http-metrics
          initialDelaySeconds: 10
          periodSeconds: 10
          successThreshold: 1
          timeoutSeconds: 1
        securityContext:
          allowPrivilegeEscalation: false
          capabilities:
            drop:
            - ALL
          readOnlyRootFilesystem: true
        volumeMounts:
        - mountPath: /etc/promtail
          name: config
        - mountPath: /run/promtail
          name: run
        - mountPath: /var/lib/docker/containers
          name: containers
          readOnly: true
        - mountPath: /var/log/pods
          name: pods
          readOnly: true
      securityContext:
        runAsGroup: 0
        runAsUser: 0
      serviceAccountName: RELEASE-NAME-promtail
      tolerations:
      - effect: NoSchedule
        key: node-role.kubernetes.io/master
        operator: Exists
      - effect: NoSchedule
        key: node-role.kubernetes.io/control-plane
        operator: Exists
      volumes:
      - name: config
        secret:
          secretName: RELEASE-NAME-promtail
      - hostPath:
          path: /run/promtail
        name: run
      - hostPath:
          path: /var/lib/docker/containers
        name: containers
      - hostPath:
          path: /var/log/pods
        name: pods
  updateStrategy: {}
