-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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: Replace wildcards in RBAC objects with explicit resources and verbs #6129
base: main
Are you sure you want to change the base?
Changes from 3 commits
05894c9
bbc839c
09e545f
cc7e1a1
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -54,16 +54,16 @@ import ( | |
"github.com/kedacore/keda/v2/pkg/util" | ||
) | ||
|
||
// +kubebuilder:rbac:groups=keda.sh,resources=scaledobjects;scaledobjects/finalizers;scaledobjects/status,verbs="*" | ||
// +kubebuilder:rbac:groups=autoscaling,resources=horizontalpodautoscalers,verbs="*" | ||
// +kubebuilder:rbac:groups=keda.sh,resources=scaledobjects;scaledobjects/finalizers;scaledobjects/status,verbs=get;list;watch;update;patch | ||
// +kubebuilder:rbac:groups=autoscaling,resources=horizontalpodautoscalers,verbs=get;list;watch;update;patch;create;delete | ||
// +kubebuilder:rbac:groups="",resources=configmaps;configmaps/status,verbs=get;list;watch | ||
// +kubebuilder:rbac:groups="",resources=events,verbs="*" | ||
// +kubebuilder:rbac:groups="",resources=events,verbs=create;patch | ||
// +kubebuilder:rbac:groups="",resources=pods;services;services;secrets;external,verbs=get;list;watch | ||
// +kubebuilder:rbac:groups="*",resources="*/scale",verbs=get;list;watch;update;patch | ||
// +kubebuilder:rbac:groups="apps",resources=deployments/scale;statefulsets/scale,verbs=get;list;watch;update;patch | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We have to revert this change because KEDA must allow scaling any resource as default using raw manifests There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thank you for the review, @JorTurFer ! |
||
// +kubebuilder:rbac:groups="",resources="serviceaccounts",verbs=list;watch | ||
// +kubebuilder:rbac:groups="*",resources="*",verbs=get | ||
// +kubebuilder:rbac:groups="apps",resources=deployments;statefulsets,verbs=list;watch | ||
// +kubebuilder:rbac:groups="coordination.k8s.io",namespace=keda,resources=leases,verbs="*" | ||
// +kubebuilder:rbac:groups="coordination.k8s.io",namespace=keda,resources=leases,verbs=get;list;watch;update;patch;create;delete | ||
// +kubebuilder:rbac:groups="",resources="limitranges",verbs=list;watch | ||
|
||
// ScaledObjectReconciler reconciles a ScaledObject object | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wasn't sure about this being sufficient but it should be fine. For any other reviewers, here is the docs
https://book.kubebuilder.io/reference/raising-events#granting-the-required-permissions