apiVersion: apps/v1
kind: DaemonSet
metadata:
  name: svcwatcher
  namespace: kube-system
spec:
  selector:
    matchLabels:
      danm.k8s.io: svcwatcher
  template:
    metadata:
      annotations:
        # Adapt to your own network environment!
        danm.k8s.io/interfaces: |
          [
            {
              "network":"flannel"
            }
          ]
      labels:
        danm.k8s.io: svcwatcher
    spec:
      serviceAccount: svcwatcher
      dnsPolicy: ClusterFirst
      nodeSelector:
        "node-role.kubernetes.io/master": ""
      containers:
        - name: svcwatcher
          image: localhost:5000/svcwatcher
          imagePullPolicy: IfNotPresent
          args:
            - "--logtostderr"
      tolerations:
       - effect: NoSchedule
         operator: Exists
       - effect: NoExecute
         operator: Exists
      terminationGracePeriodSeconds: 0
