@@ -62,20 +62,23 @@ rules:
62
62
- apiGroups : ["topology.node.k8s.io"]
63
63
resources : ["noderesourcetopologies"]
64
64
verbs : ["get", "list", "watch"]
65
- # resources need to be updated with the scheduler plugins used
66
65
- apiGroups : ["scheduling.x-k8s.io"]
67
66
resources : ["podgroups", "elasticquotas", "podgroups/status", "elasticquotas/status"]
68
67
verbs : ["get", "list", "watch", "create", "delete", "update", "patch"]
69
- # for network-aware plugins add the following lines
70
- # - apiGroups: [ "appgroup.diktyo.x-k8s.io" ]
71
- # resources: [ "appgroups" ]
72
- # verbs: [ "get", "list", "watch", "create", "delete", "update", "patch" ]
73
- # - apiGroups: [ "networktopology.diktyo.x-k8s.io" ]
74
- # resources: [ "networktopologies" ]
75
- # verbs: [ "get", "list", "watch", "create", "delete", "update", "patch" ]
76
- # - apiGroups: ["security-profiles-operator.x-k8s.io"]
77
- # resources: ["seccompprofiles", "profilebindings"]
78
- # verbs: ["get", "list", "watch", "create", "delete", "update", "patch"]
68
+ {{- /* resources need to be updated with the scheduler plugins used */}}
69
+ {{- if has "NetworkOverhead" .Values.plugins.enabled }}
70
+ - apiGroups : [ "appgroup.diktyo.x-k8s.io" ]
71
+ resources : [ "appgroups" ]
72
+ verbs : [ "get", "list", "watch", "create", "delete", "update", "patch" ]
73
+ - apiGroups : [ "networktopology.diktyo.x-k8s.io" ]
74
+ resources : [ "networktopologies" ]
75
+ verbs : [ "get", "list", "watch", "create", "delete", "update", "patch" ]
76
+ {{- end }}
77
+ {{- if has "SySched" .Values.plugins.enabled }}
78
+ - apiGroups : ["security-profiles-operator.x-k8s.io"]
79
+ resources : ["seccompprofiles", "profilebindings"]
80
+ verbs : ["get", "list", "watch", "create", "delete", "update", "patch"]
81
+ {{- end }}
79
82
---
80
83
kind : ClusterRoleBinding
81
84
apiVersion : rbac.authorization.k8s.io/v1
@@ -107,13 +110,20 @@ rules:
107
110
- apiGroups : ["topology.node.k8s.io"]
108
111
resources : ["noderesourcetopologies"]
109
112
verbs : ["get", "list", "watch"]
110
- # resources need to be updated with the scheduler plugins used
111
113
- apiGroups : ["scheduling.x-k8s.io"]
112
114
resources : ["podgroups", "elasticquotas", "podgroups/status", "elasticquotas/status"]
113
115
verbs : ["get", "list", "watch", "create", "delete", "update", "patch"]
114
- # - apiGroups: ["security-profiles-operator.x-k8s.io"]
115
- # resources: ["seccompprofiles", "profilebindings"]
116
- # verbs: ["get", "list", "watch", "create", "delete", "update", "patch"]
116
+ {{- /* resources need to be updated with the scheduler plugins used */}}
117
+ {{- if has "PreemptionToleration" .Values.plugins.enabled }}
118
+ - apiGroups : ["scheduling.k8s.io"]
119
+ resources : ["priorityclasses"]
120
+ verbs : ["get", "list", "watch"]
121
+ {{- end }}
122
+ {{- if has "SySched" .Values.plugins.enabled }}
123
+ - apiGroups : ["security-profiles-operator.x-k8s.io"]
124
+ resources : ["seccompprofiles", "profilebindings"]
125
+ verbs : ["get", "list", "watch", "create", "delete", "update", "patch"]
126
+ {{- end }}
117
127
---
118
128
kind : ClusterRoleBinding
119
129
apiVersion : rbac.authorization.k8s.io/v1
0 commit comments