apiVersion: extensions/v1beta1 kind: DaemonSet metadata: namespace: netsil name: collector labels: app: netsil component: collector spec: template: metadata: labels: app: netsil component: collector spec: hostNetwork: true dnsPolicy: Default containers: - name: collector image: netsil/collectors:latest command: ["/bin/bash","-c","while true ; do NETSIL_SP_HOST=$NETSIL_SERVICE_HOST /opt/netsil/collectors/start.sh ; echo Exiting, possibly to upgrade ; sleep 5 ; done"] securityContext: capabilities: add: - NET_RAW - NET_ADMIN env: # Please DO NOT prepend http:// or https:// to the NETSIL_SERVICE_HOST value - name: NETSIL_SERVICE_HOST value: ${your_netsil_ip} - name: NETSIL_ORGANIZATION_ID value: ${organizationId} - name: DEPLOY_ENV value: 'docker' - name: KUBERNETES value: "yes" - name: SD_BACKEND value: docker volumeMounts: - name: cgroup mountPath: /host/sys/fs/cgroup/ readOnly: true - name: proc mountPath: /host/proc/ readOnly: true - name: docker-sock mountPath: /var/run/docker.sock readOnly: true volumes: - name: cgroup hostPath: path: /sys/fs/cgroup/ - name: proc hostPath: path: /proc/ - name: docker-sock hostPath: path: /var/run/docker.sock