Closed legal90 closed 3 weeks ago
This PR look nice, but we can revert if by mistake during the release if we copy the RBAC from KEDA repo. Could you open a PR there too, changing the RBAC? 🙏
Thank you, @JorTurFer ! I submitted the similar PR to the main KEDA repo: https://github.com/kedacore/keda/pull/6129
It was a CI problem, the fix is merged and I've rebased your PR
@JorTurFer @zroubalik Will this break a scenario when horizontal-pod-autoscaler
ServiceAccount's token was used for connecting to the Datadog Cluster Agent?
As per KEDA's documentation:
Bearer authentication:
token - The ServiceAccount token to connect to the Datadog Cluster Agent.
The service account needs to have permissions to get, watch, and
list all external.metrics.k8s.io resources.
UPD
Nevermind. There is another ClusterRole called datadog-cluster-agent-external-metrics-reader
that's also attached to the horizontal-pod-autoscaler
SA and that role has all the neccessary RBAC rules.
According to Kubernetes documentation and various k8s security guidelines, wildcards in resource and verb entries should be avoided:
Refs:
This PR could be seen as a continuation of a previous work for hardening the RBAC: https://github.com/kedacore/charts/pull/625 It replaces
*
with explicit verbs and resources, according to KEDA needs.Checklist
Similar PR to the main keda repo: https://github.com/kedacore/keda/pull/6129