apiVersion: apps/v1
kind: DaemonSet
metadata:
  name: nri-flex
  namespace: default
  labels:
    name: nri-flex
spec:
  selector:
    matchLabels:
      name: nri-flex
  updateStrategy:
    type: RollingUpdate
  template:
    metadata:
      labels:
        name: nri-flex
    spec:
      containers:
        - name: nri-flex
          image: "YourDockerUserName/nri-flex-YourCustomFlexImage"
          imagePullPolicy: Always
          env:
          - name: NRIA_LICENSE_KEY
            value: "YourNR-LicenseKey"
          - name: CONTAINER_DISCOVERY
            value: "true"
          ### Sync integrations dynamically from your git repository
          # - name: GIT_REPO 
          #   value: "https://github.com/userName/repoName"
          # - name: GIT_USER
          #   value: "myGithubUser"
          # - name: GIT_TOKEN
          #   value: "myGithubToken"
          volumeMounts:
            - name: dockersock
              mountPath: /var/run/docker.sock
              readOnly:  true
            - name: proc
              mountPath: /host/proc
              readOnly: true
          resources:
            limits:
              memory: 150M
            requests:
              cpu: 100m
              memory: 30M
      hostNetwork: true
      hostPID: true
      volumes:
        - name: dockersock
          hostPath:
            path: /var/run/docker.sock
        - name: proc
          hostPath:
            path: /proc