Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Role permissions are not cluster scoped when using generated manifests. #366

Closed
rustysys-dev opened this issue Nov 25, 2020 · 0 comments · Fixed by #367
Closed

Role permissions are not cluster scoped when using generated manifests. #366

rustysys-dev opened this issue Nov 25, 2020 · 0 comments · Fixed by #367

Comments

@rustysys-dev
Copy link
Contributor

After searching for the cause, it seems that when generating manifests the ClusterRoleBinding object is used, but the manually input kind RoleBinding doesn't match.

func NewCluterRoleBindingForOperator(saName, ns string) *rbacv1.ClusterRoleBinding {
return &rbacv1.ClusterRoleBinding{
TypeMeta: metav1.TypeMeta{
APIVersion: "rbac.authorization.k8s.io/v1",
Kind: "RoleBinding",
},
ObjectMeta: metav1.ObjectMeta{

This causes the following errors.

E1125 05:58:51.544661       1 reflector.go:178] k8s.io/client-go@v0.18.6/tools/cache/reflector.go:125: Failed to list *v1.Service: services is forbidden: User "system:serviceaccount:minio-system:minio-operator" cannot list resource "services" in API group "" at the cluster scope
E1125 05:58:55.815436       1 reflector.go:178] k8s.io/client-go@v0.18.6/tools/cache/reflector.go:125: Failed to list *v1.Deployment: deployments.apps is forbidden: User "system:serviceaccount:minio-system:minio-operator" cannot list resource "deployments" in API group "apps" at the cluster scope
E1125 05:58:58.712488       1 reflector.go:178] k8s.io/client-go@v0.18.6/tools/cache/reflector.go:125: Failed to list *v1.StatefulSet: statefulsets.apps is forbidden: User "system:serviceaccount:minio-system:minio-operator" cannot list resource "statefulsets" in API group "apps" at the cluster scope
E1125 05:59:04.493718       1 reflector.go:178] k8s.io/client-go@v0.18.6/tools/cache/reflector.go:125: Failed to list *v1.Job: jobs.batch is forbidden: User "system:serviceaccount:minio-system:minio-operator" cannot list resource "jobs" in API group "batch" at the cluster scope
[ec2-user@ip-172-31-35-181 setup]$ Connection to 54.248.171.59 closed by remote host.
Connection to 54.248.171.59 closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant