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

fix:find the permissions needed for the command gen_test_dataset #695

Merged
merged 1 commit into from
Feb 2, 2024

Conversation

xxxxibo
Copy link
Contributor

@xxxxibo xxxxibo commented Jan 31, 2024

What type of PR is this?

/kind bug

What this PR does / why we need it

Find the permissions needed for the command gen_test_dataset

Which issue(s) this PR fixes

Fixes #

Special notes for your reviewer

@bjwswang
Copy link
Collaborator

bjwswang commented Feb 1, 2024

@0xff-dev Is this good enough? Should we add the cluster role permissions ?

1.7067048284279842e+09  ERROR   Reconciler error        {"controller": "namespace", "controllerGroup": "", "controllerKind": "Namespace", "namespace": {"name":"kube-system"}, "namespace": "", "name": "kube-system", "reconcileID": "97dd6165-232f-492d-8b3a-76e8ace5441f", "error": "Operation cannot be fulfilled on clusterrolebindings.rbac.authorization.k8s.io \"ragas-eval-clusterrolebinding\": the object has been modified; please apply your changes to the latest version and try again"}
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem
        /go/pkg/mod/sigs.k8s.io/controller-runtime@v0.12.2/pkg/internal/controller/controller.go:273
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func2.2
        /go/pkg/mod/sigs.k8s.io/controller-runtime@v0.12.2/pkg/internal/controller/controller.go:234

@0xff-dev
Copy link
Collaborator

0xff-dev commented Feb 1, 2024

@0xff-dev Is this good enough? Should we add the cluster role permissions ?

1.7067048284279842e+09  ERROR   Reconciler error        {"controller": "namespace", "controllerGroup": "", "controllerKind": "Namespace", "namespace": {"name":"kube-system"}, "namespace": "", "name": "kube-system", "reconcileID": "97dd6165-232f-492d-8b3a-76e8ace5441f", "error": "Operation cannot be fulfilled on clusterrolebindings.rbac.authorization.k8s.io \"ragas-eval-clusterrolebinding\": the object has been modified; please apply your changes to the latest version and try again"}
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem
        /go/pkg/mod/sigs.k8s.io/controller-runtime@v0.12.2/pkg/internal/controller/controller.go:273
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func2.2
        /go/pkg/mod/sigs.k8s.io/controller-runtime@v0.12.2/pkg/internal/controller/controller.go:234

The error reported here is from the controller, while trying to bind serviceaccount to clusterrolebinding, the resource changed and needs to be updated again.
It has nothing to do with the permissions of this PR.

The controller's permissions to operate on clusterrolebiding have been updated in rbac.yaml in the helm package

@nkwangleiGIT
Copy link
Contributor

I also noticed that the controller report the warning some frequent:

please apply your changes to the latest version and try again"}
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem

@0xff-dev pls check why it's always conflict while binding serviceaccount to clusterrolebinding, can we try to avoid this?

@bjwswang
Copy link
Collaborator

bjwswang commented Feb 2, 2024

Seems we are trying to modify the same clusterrolebinding in parallel.We have two options:

option 1: maintain a clusterrolebinding for each ns
option 2: make sure the namespace controller process events sequencially

@bjwswang
Copy link
Collaborator

bjwswang commented Feb 2, 2024

@xxxxibo Please rebase your branch

@bjwswang bjwswang merged commit 6a28a85 into kubeagi:main Feb 2, 2024
6 checks passed
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 this pull request may close these issues.

4 participants