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

Add permission to Zora Operator delete service accounts #249

Merged
merged 1 commit into from
Feb 29, 2024

Conversation

matheusfm
Copy link
Contributor

Description

This PR adds permission to Zora Operator delete service accounts.
It's need on OpenShift. Without this permission we got the error below.

{"level":"error","ts":"2024-02-29T19:08:03Z","msg":"failed to apply ServiceAccount zora-plugins","controller":"clusterscan","controllerGroup":"zora.undistro.io","controllerKind":"ClusterScan","ClusterScan":{"name":"openshift-hml-misconfig","namespace":"zora-system"},"namespace":"zora-system","name":"openshift-hml-misconfig","reconcileID":"64ec15a1-fe02-43f1-9219-fff99392684c","resourceVersion":"753793202","error":"serviceaccounts \"zora-plugins\" is forbidden: cannot set an ownerRef on a resource you can't delete: , <nil>","stacktrace":"github.com/undistro/zora/internal/controller/zora.(*ClusterScanReconciler).applyRBAC\n\t/workspace/internal/controller/zora/clusterscan_controller.go:472\ngithub.com/undistro/zora/internal/controller/zora.(*ClusterScanReconciler).reconcile\n\t/workspace/internal/controller/zora/clusterscan_controller.go:188\ngithub.com/undistro/zora/internal/controller/zora.(*ClusterScanReconciler).Reconcile\n\t/workspace/internal/controller/zora/clusterscan_controller.go:130\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Reconcile\n\t/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.16.3/pkg/internal/controller/controller.go:119\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler\n\t/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.16.3/pkg/internal/controller/controller.go:316\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem\n\t/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.16.3/pkg/internal/controller/controller.go:266\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func2.2\n\t/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.16.3/pkg/internal/controller/controller.go:227"}

How has this been tested?

  • Installing on OpenShift

Checklist

  • I have labeled this PR with the relevant Type labels
  • I have documented my code (if applicable)
  • My changes are covered by tests

@matheusfm matheusfm added the bug 🐛 Something isn't working label Feb 29, 2024
@matheusfm matheusfm requested a review from knrc February 29, 2024 20:03
@matheusfm matheusfm self-assigned this Feb 29, 2024
@matheusfm matheusfm merged commit f724f8e into main Feb 29, 2024
4 checks passed
@matheusfm matheusfm deleted the UD-1250-delete-sa-permission branch February 29, 2024 20:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants