@@ -62,20 +62,23 @@ rules:
6262- apiGroups : ["topology.node.k8s.io"]
6363 resources : ["noderesourcetopologies"]
6464 verbs : ["get", "list", "watch"]
65- # resources need to be updated with the scheduler plugins used
6665- apiGroups : ["scheduling.x-k8s.io"]
6766 resources : ["podgroups", "elasticquotas", "podgroups/status", "elasticquotas/status"]
6867 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 }}
7982---
8083kind : ClusterRoleBinding
8184apiVersion : rbac.authorization.k8s.io/v1
@@ -107,13 +110,20 @@ rules:
107110- apiGroups : ["topology.node.k8s.io"]
108111 resources : ["noderesourcetopologies"]
109112 verbs : ["get", "list", "watch"]
110- # resources need to be updated with the scheduler plugins used
111113- apiGroups : ["scheduling.x-k8s.io"]
112114 resources : ["podgroups", "elasticquotas", "podgroups/status", "elasticquotas/status"]
113115 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 }}
117127---
118128kind : ClusterRoleBinding
119129apiVersion : rbac.authorization.k8s.io/v1
0 commit comments