Skip to content

Commit 01738f4

Browse files
authored
fix: Add missing impersonate rule (#845)
* Add missing permission in clusterrole Signed-off-by: Varsha B <[email protected]> * test change Signed-off-by: Varsha B <[email protected]> --------- Signed-off-by: Varsha B <[email protected]>
1 parent 9b14ac4 commit 01738f4

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

controllers/argocd/openshift/openshift.go

+11
Original file line numberDiff line numberDiff line change
@@ -333,6 +333,17 @@ func policyRulesForClusterConfig() []rbacv1.PolicyRule {
333333
"*",
334334
},
335335
},
336+
{
337+
APIGroups: []string{
338+
"",
339+
},
340+
Resources: []string{
341+
"serviceaccounts",
342+
},
343+
Verbs: []string{
344+
"impersonate",
345+
},
346+
},
336347
}
337348
}
338349

controllers/argocd/openshift/openshift_test.go

+1-2
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,7 @@ func TestReconcileArgoCD_reconcileMultipleClusterRoles(t *testing.T) {
4545
a := makeTestArgoCDForClusterConfig()
4646
testApplicableClusterRole := &rbacv1.ClusterRole{
4747
ObjectMeta: metav1.ObjectMeta{
48-
Name: a.Name + "-" + a.Namespace + "-" + testApplicationController,
49-
Namespace: a.Namespace,
48+
Name: a.Name + "-" + a.Namespace + "-" + testApplicationController,
5049
},
5150
Rules: makeTestPolicyRules(),
5251
}

0 commit comments

Comments
 (0)