Skip to content

Commit bf9b879

Browse files
committed
fix: add ocirepositories to nsaccess rules
1 parent 9722058 commit bf9b879

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

core/nsaccess/nsaccess.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,14 @@ import (
1818
var DefautltWegoAppRules = []rbacv1.PolicyRule{
1919
{
2020
APIGroups: []string{""},
21-
Resources: []string{"secrets", "pods", "events"},
21+
Resources: []string{"pods", "secrets"},
2222
Verbs: []string{"get", "list"},
2323
},
24+
{
25+
APIGroups: []string{""},
26+
Resources: []string{"events"},
27+
Verbs: []string{"get", "list", "watch"},
28+
},
2429
{
2530
APIGroups: []string{"apps"},
2631
Resources: []string{"deployments", "replicasets"},
@@ -38,14 +43,9 @@ var DefautltWegoAppRules = []rbacv1.PolicyRule{
3843
},
3944
{
4045
APIGroups: []string{"source.toolkit.fluxcd.io"},
41-
Resources: []string{"buckets", "helmcharts", "gitrepositories", "helmrepositories"},
46+
Resources: []string{"buckets", "helmcharts", "helmrepositories", "gitrepositories", "ocirepositories"},
4247
Verbs: []string{"get", "list"},
4348
},
44-
{
45-
APIGroups: []string{""},
46-
Resources: []string{"events"},
47-
Verbs: []string{"get", "list", "watch"},
48-
},
4949
}
5050

5151
// Checker contains methods for validing user access to Kubernetes namespaces, based on a set of PolicyRules

0 commit comments

Comments
 (0)