apiVersion: v1
kind: Pod
metadata:
  name: fluentd
  labels:
    app: fluentd
spec:
  securityContext:
    seccompProfile:
      type: RuntimeDefault
  priorityClassName: system-node-critical
  serviceAccountName: fluentd
  containers:
  - name: fluentd
    imagePullPolicy: Always
    image: retaildevcrew/fluentd-azure-log-analytics:latest
    env:
    - name: FLUENTD_ARGS
      value: --no-supervisor -q
    resources:
      limits:
        memory: 500Mi
      requests:
        cpu: 100m
        memory: 200Mi
    volumeMounts:
    - name: varlog
      mountPath: /var/log
    - name: varlibdockercontainers
      mountPath: /var/lib/docker/containers
      readOnly: true
    - name: config-volume
      mountPath: /etc/fluent/config.d
    ports:
    - containerPort: 24231
      name: prometheus
      protocol: TCP
  terminationGracePeriodSeconds: 30
  volumes:
  - name: varlog
    hostPath:
      path: /var/log
  - name: varlibdockercontainers
    hostPath:
      path: /var/lib/docker/containers
  - name: config-volume
    configMap:
      name: fluentd-debug-config
