Skip to content

Commit

Permalink
Add configmaps permissions to the rollout_operator_role (grafana#8228)
Browse files Browse the repository at this point in the history
* Add configmaps permissions to the rollout_operator_role to assist with horizontal autoscaling

* CHANGELOG

* Generate yaml with mimir-tests/build.sh
  • Loading branch information
johannaratliff authored and narqo committed Jun 6, 2024
1 parent dd67f56 commit 5329990
Show file tree
Hide file tree
Showing 25 changed files with 188 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@
* [ENHANCEMENT] Add support to autoscale ruler-querier replicas based on in-flight queries too (in addition to CPU and memory based scaling). #8060 #8188
* [ENHANCEMENT] Distributor: improved distributor HPA scaling metric to only take in account ready pods. This requires the metric `kube_pod_status_ready` to be available in the data source used by KEDA to query scaling metrics (configured via `_config.autoscaling_prometheus_url`). #8250
* [BUGFIX] Guard against missing samples in KEDA queries. #7691
* [BUGFIX] Add configmaps mutability to the `rollout_operator_role`. #8228

### Mimirtool

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,14 @@ rules:
- statefulsets/status
verbs:
- update
- apiGroups:
- ""
resources:
- configmaps
verbs:
- get
- update
- create
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,14 @@ rules:
- statefulsets/status
verbs:
- update
- apiGroups:
- ""
resources:
- configmaps
verbs:
- get
- update
- create
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
Expand Down
8 changes: 8 additions & 0 deletions operations/mimir-tests/test-consul-multi-zone-generated.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -480,6 +480,14 @@ rules:
- statefulsets/status
verbs:
- update
- apiGroups:
- ""
resources:
- configmaps
verbs:
- get
- update
- create
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,14 @@ rules:
- statefulsets/status
verbs:
- update
- apiGroups:
- ""
resources:
- configmaps
verbs:
- get
- update
- create
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,14 @@ rules:
- statefulsets/status
verbs:
- update
- apiGroups:
- ""
resources:
- configmaps
verbs:
- get
- update
- create
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,14 @@ rules:
- statefulsets/status
verbs:
- update
- apiGroups:
- ""
resources:
- configmaps
verbs:
- get
- update
- create
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -320,6 +320,14 @@ rules:
- statefulsets/status
verbs:
- update
- apiGroups:
- ""
resources:
- configmaps
verbs:
- get
- update
- create
- apiGroups:
- rollout-operator.grafana.com
resources:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -320,6 +320,14 @@ rules:
- statefulsets/status
verbs:
- update
- apiGroups:
- ""
resources:
- configmaps
verbs:
- get
- update
- create
- apiGroups:
- rollout-operator.grafana.com
resources:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,14 @@ rules:
- statefulsets/status
verbs:
- update
- apiGroups:
- ""
resources:
- configmaps
verbs:
- get
- update
- create
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,14 @@ rules:
- statefulsets/status
verbs:
- update
- apiGroups:
- ""
resources:
- configmaps
verbs:
- get
- update
- create
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,14 @@ rules:
- statefulsets/status
verbs:
- update
- apiGroups:
- ""
resources:
- configmaps
verbs:
- get
- update
- create
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,14 @@ rules:
- statefulsets/status
verbs:
- update
- apiGroups:
- ""
resources:
- configmaps
verbs:
- get
- update
- create
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,14 @@ rules:
- statefulsets/status
verbs:
- update
- apiGroups:
- ""
resources:
- configmaps
verbs:
- get
- update
- create
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,14 @@ rules:
- statefulsets/status
verbs:
- update
- apiGroups:
- ""
resources:
- configmaps
verbs:
- get
- update
- create
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,14 @@ rules:
- statefulsets/status
verbs:
- update
- apiGroups:
- ""
resources:
- configmaps
verbs:
- get
- update
- create
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,14 @@ rules:
- statefulsets/status
verbs:
- update
- apiGroups:
- ""
resources:
- configmaps
verbs:
- get
- update
- create
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -320,6 +320,14 @@ rules:
- statefulsets/status
verbs:
- update
- apiGroups:
- ""
resources:
- configmaps
verbs:
- get
- update
- create
- apiGroups:
- rollout-operator.grafana.com
resources:
Expand Down
8 changes: 8 additions & 0 deletions operations/mimir-tests/test-multi-zone-generated.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,14 @@ rules:
- statefulsets/status
verbs:
- update
- apiGroups:
- ""
resources:
- configmaps
verbs:
- get
- update
- create
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,14 @@ rules:
- statefulsets/status
verbs:
- update
- apiGroups:
- ""
resources:
- configmaps
verbs:
- get
- update
- create
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,14 @@ rules:
- statefulsets/status
verbs:
- update
- apiGroups:
- ""
resources:
- configmaps
verbs:
- get
- update
- create
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,14 @@ rules:
- statefulsets/status
verbs:
- update
- apiGroups:
- ""
resources:
- configmaps
verbs:
- get
- update
- create
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,14 @@ rules:
- statefulsets/status
verbs:
- update
- apiGroups:
- ""
resources:
- configmaps
verbs:
- get
- update
- create
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,14 @@ rules:
- statefulsets/status
verbs:
- update
- apiGroups:
- ""
resources:
- configmaps
verbs:
- get
- update
- create
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
Expand Down
3 changes: 3 additions & 0 deletions operations/mimir/rollout-operator.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@
policyRule.withApiGroups('apps') +
policyRule.withResources(['statefulsets/status']) +
policyRule.withVerbs(['update']),
policyRule.withApiGroups('') +
policyRule.withResources(['configmaps']) +
policyRule.withVerbs(['get', 'update', 'create']),
]),

rollout_operator_rolebinding: if !rollout_operator_enabled then null else
Expand Down

0 comments on commit 5329990

Please sign in to comment.