Integrate Nokia/danm CNI into IEC
[iec.git] / src / foundation / scripts / cni / danm / integration / manifests / svcwatcher / 0svcwatcher_rbac.yaml
diff --git a/src/foundation/scripts/cni/danm/integration/manifests/svcwatcher/0svcwatcher_rbac.yaml b/src/foundation/scripts/cni/danm/integration/manifests/svcwatcher/0svcwatcher_rbac.yaml
new file mode 100644 (file)
index 0000000..bb2ea02
--- /dev/null
@@ -0,0 +1,65 @@
+# yamllint disable rule:hyphens rule:commas rule:indentation
+apiVersion: v1
+kind: ServiceAccount
+metadata:
+  name: svcwatcher
+  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:svcwatcher
+rules:
+- apiGroups:
+  - ""
+  resources:
+  - endpoints
+  verbs:
+  - list
+  - watch
+  - get
+  - update
+  - create
+  - delete
+- apiGroups:
+  - ""
+  resources:
+  - services
+  - pods
+  verbs:
+  - list
+  - watch
+  - get
+- apiGroups:
+  - "danm.k8s.io"
+  resources:
+  - danmeps
+  verbs:
+  - get
+  - list
+  - watch
+  - create
+  - update
+  - patch
+  - delete
+---
+apiVersion: rbac.authorization.k8s.io/v1
+kind: ClusterRoleBinding
+metadata:
+  annotations:
+    rbac.authorization.kubernetes.io/autoupdate: "true"
+  labels:
+    kubernetes.io/bootstrapping: rbac-defaults
+  name: system:svcwatcher
+roleRef:
+  apiGroup: rbac.authorization.k8s.io
+  kind: ClusterRole
+  name: system:svcwatcher
+subjects:
+- kind: ServiceAccount
+  namespace: kube-system
+  name: svcwatcher