aboutsummaryrefslogtreecommitdiffstats
path: root/tools/k8s/cluster-deployment/k8scluster/roles/clustermanager/files/danm-netwatcher-daemonset.yaml
blob: 1b61a04afceac74fe0c95d8f004a591f7460e463 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
#
# cloned from https://github.com/nokia/danm/tree/v4.3.0/integration/manifests/netwatcher
#
---
apiVersion: v1
kind: ServiceAccount
metadata:
  name: netwatcher
  namespace: kube-system
  labels:
      kubernetes.io/cluster-service: "true"
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
  labels:
    kubernetes.io/bootstrapping: rbac-defaults
  name: system:netwatcher
rules:
rules:
- apiGroups:
  - danm.k8s.io
  resources:
  - danmnets
  - clusternetworks
  - tenantnetworks
  verbs:
  - get
  - list
  - watch
  - update
- apiGroups:
  - k8s.cni.cncf.io
  resources:
  - network-attachment-definitions
  verbs:
  - get
  - list
  - watch
  - update
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
  annotations:
    rbac.authorization.kubernetes.io/autoupdate: "true"
  labels:
    kubernetes.io/bootstrapping: rbac-defaults
  name: system:netwatcher
roleRef:
  apiGroup: rbac.authorization.k8s.io
  kind: ClusterRole
  name: system:netwatcher
subjects:
- kind: ServiceAccount
  namespace: kube-system
  name: netwatcher
---
apiVersion: apps/v1
kind: DaemonSet
metadata:
  name: netwatcher
  namespace: kube-system
spec:
  selector:
    matchLabels:
      danm.k8s.io: netwatcher
  template:
    metadata:
      labels:
        danm.k8s.io: netwatcher
    spec:
      serviceAccountName: netwatcher
      hostNetwork: true
      dnsPolicy: ClusterFirst
      hostIPC: true
      hostPID: true
      containers:
        - name: netwatcher
          image: netwatcher
          imagePullPolicy: IfNotPresent
          securityContext:
            capabilities:
              add:
                - SYS_PTRACE
                - SYS_ADMIN
                - NET_ADMIN
                - NET_RAW
      tolerations:
       - effect: NoSchedule
         operator: Exists
       - effect: NoExecute
         operator: Exists
      terminationGracePeriodSeconds: 0