1
+ # Those YAML are all needed when drift-detection-manager is started in the
2
+ # management cluster. Those are not installed by addon-controller when deploying
3
+ # drift-detection-manager in the management cluster to avoid granting addon-controller
4
+ # extra permissions
5
+ apiVersion : v1
6
+ kind : ServiceAccount
7
+ metadata :
8
+ name : drift-detection-manager
9
+ namespace : projectsveltos
10
+ ---
11
+ # When running in the management cluster, drift-detection-manager needs
12
+ # to access Secret containing Kubeconfig for managed cluster (and consequently
13
+ # access Cluster/SveltosCluster to verify existance)
14
+ apiVersion : rbac.authorization.k8s.io/v1
15
+ kind : ClusterRole
16
+ metadata :
17
+ name : drift-detection-manager-role
18
+ rules :
19
+ - apiGroups :
20
+ - " "
21
+ resources :
22
+ - configmaps
23
+ verbs :
24
+ - create
25
+ - get
26
+ - list
27
+ - update
28
+ - watch
29
+ - apiGroups :
30
+ - ' *'
31
+ resources :
32
+ - ' *'
33
+ verbs :
34
+ - get
35
+ - list
36
+ - watch
37
+ - apiGroups :
38
+ - authentication.k8s.io
39
+ resources :
40
+ - tokenreviews
41
+ verbs :
42
+ - create
43
+ - apiGroups :
44
+ - authorization.k8s.io
45
+ resources :
46
+ - subjectaccessreviews
47
+ verbs :
48
+ - create
49
+ - apiGroups :
50
+ - lib.projectsveltos.io
51
+ resources :
52
+ - debuggingconfigurations
53
+ verbs :
54
+ - get
55
+ - list
56
+ - watch
57
+ - apiGroups :
58
+ - lib.projectsveltos.io
59
+ resources :
60
+ - resourcesummaries
61
+ verbs :
62
+ - create
63
+ - delete
64
+ - get
65
+ - list
66
+ - patch
67
+ - update
68
+ - watch
69
+ - apiGroups :
70
+ - lib.projectsveltos.io
71
+ resources :
72
+ - resourcesummaries/finalizers
73
+ verbs :
74
+ - update
75
+ - apiGroups :
76
+ - lib.projectsveltos.io
77
+ resources :
78
+ - resourcesummaries/status
79
+ verbs :
80
+ - get
81
+ - patch
82
+ - update
83
+ ---
84
+ apiVersion : rbac.authorization.k8s.io/v1
85
+ kind : ClusterRole
86
+ metadata :
87
+ name : drift-detection-metrics-reader
88
+ rules :
89
+ - nonResourceURLs :
90
+ - /metrics
91
+ verbs :
92
+ - get
93
+ ---
94
+ apiVersion : rbac.authorization.k8s.io/v1
95
+ kind : ClusterRole
96
+ metadata :
97
+ name : drift-detection-proxy-role
98
+ rules :
99
+ - apiGroups :
100
+ - authentication.k8s.io
101
+ resources :
102
+ - tokenreviews
103
+ verbs :
104
+ - create
105
+ - apiGroups :
106
+ - authorization.k8s.io
107
+ resources :
108
+ - subjectaccessreviews
109
+ verbs :
110
+ - create
111
+ ---
112
+ apiVersion : rbac.authorization.k8s.io/v1
113
+ kind : ClusterRoleBinding
114
+ metadata :
115
+ name : drift-detection-manager-rolebinding
116
+ roleRef :
117
+ apiGroup : rbac.authorization.k8s.io
118
+ kind : ClusterRole
119
+ name : drift-detection-manager-role
120
+ subjects :
121
+ - kind : ServiceAccount
122
+ name : drift-detection-manager
123
+ namespace : projectsveltos
124
+ ---
125
+ apiVersion : rbac.authorization.k8s.io/v1
126
+ kind : ClusterRoleBinding
127
+ metadata :
128
+ name : drift-detection-proxy-rolebinding
129
+ roleRef :
130
+ apiGroup : rbac.authorization.k8s.io
131
+ kind : ClusterRole
132
+ name : drift-detection-proxy-role
133
+ subjects :
134
+ - kind : ServiceAccount
135
+ name : drift-detection-manager
136
+ namespace : projectsveltos
137
+ ---
0 commit comments