---
apiVersion: apps/v1
kind: DaemonSet
metadata:
  name: aws-cloudwatch-metrics
  labels:
    helm.sh/chart: aws-cloudwatch-metrics-0.0.5
    app.kubernetes.io/name: aws-cloudwatch-metrics
    app.kubernetes.io/version: '1.247345'
    app.kubernetes.io/managed-by: Helm
spec:
  selector:
    matchLabels:
      app.kubernetes.io/name: aws-cloudwatch-metrics
  template:
    metadata:
      labels:
        app.kubernetes.io/name: aws-cloudwatch-metrics
    spec:
      serviceAccountName: aws-cloudwatch-metrics
      hostNetwork: false
      containers:
      - name: aws-cloudwatch-metrics
        image: amazon/cloudwatch-agent:1.247345.36b249270
        imagePullPolicy: IfNotPresent
        env:
        - name: HOST_IP
          valueFrom:
            fieldRef:
              fieldPath: status.hostIP
        - name: HOST_NAME
          valueFrom:
            fieldRef:
              fieldPath: spec.nodeName
        - name: K8S_NAMESPACE
          valueFrom:
            fieldRef:
              fieldPath: metadata.namespace
        - name: CI_VERSION
          value: k8s/1.2.2
        volumeMounts:
        - name: cwagentconfig
          mountPath: /etc/cwagentconfig
        - name: rootfs
          mountPath: /rootfs
          readOnly: true
        - name: dockersock
          mountPath: /var/run/docker.sock
          readOnly: true
        - name: varlibdocker
          mountPath: /var/lib/docker
          readOnly: true
        - name: sys
          mountPath: /sys
          readOnly: true
        - name: devdisk
          mountPath: /dev/disk
          readOnly: true
        resources:
          limits:
            cpu: 200m
            memory: 200Mi
          requests:
            cpu: 200m
            memory: 200Mi
      volumes:
      - name: cwagentconfig
        configMap:
          name: aws-cloudwatch-metrics
      - name: rootfs
        hostPath:
          path: /
      - name: dockersock
        hostPath:
          path: /var/run/docker.sock
      - name: varlibdocker
        hostPath:
          path: /var/lib/docker
      - name: sys
        hostPath:
          path: /sys
      - name: devdisk
        hostPath:
          path: /dev/disk/
      terminationGracePeriodSeconds: 60
