@@ -129,7 +129,33 @@ func (authz *FeastAuthorization) setFeastClusterRole(clusterRole *rbacv1.Cluster
129129 Resources : []string {"rolebindings" },
130130 Verbs : []string {"list" },
131131 },
132+ {
133+ APIGroups : []string {"authentication.k8s.io" },
134+ Resources : []string {"tokenreviews" },
135+ Verbs : []string {"create" },
136+ },
137+ {
138+ APIGroups : []string {rbacv1 .GroupName },
139+ Resources : []string {"subjectaccessreviews" },
140+ Verbs : []string {"create" },
141+ },
142+ {
143+ APIGroups : []string {"" },
144+ Resources : []string {"namespaces" },
145+ Verbs : []string {"get" , "list" , "watch" },
146+ },
147+ {
148+ APIGroups : []string {rbacv1 .GroupName },
149+ Resources : []string {"clusterroles" },
150+ Verbs : []string {"get" , "list" },
151+ },
152+ {
153+ APIGroups : []string {rbacv1 .GroupName },
154+ Resources : []string {"clusterrolebindings" },
155+ Verbs : []string {"get" , "list" },
156+ },
132157 }
158+ // Don't set controller reference for shared ClusterRole
133159 return nil
134160}
135161
@@ -320,7 +346,9 @@ func (authz *FeastAuthorization) getFeastClusterRoleName() string {
320346}
321347
322348func GetFeastClusterRoleName (featureStore * feastdevv1alpha1.FeatureStore ) string {
323- return services .GetFeastName (featureStore ) + "-cluster"
349+ // Use a shared ClusterRole name for all Feast instances
350+ // This allows multiple FeatureStores to share the same Token Access Review permissions
351+ return "feast-token-review-cluster-role"
324352}
325353
326354func (authz * FeastAuthorization ) getFeastClusterRoleBindingName () string {
0 commit comments