Skip to content

Commit e7a578d

Browse files
committed
Add support for additional rule in role/clusterrole
Signed-off-by: ffais <[email protected]>
1 parent 2abc138 commit e7a578d

File tree

5 files changed

+19
-1
lines changed

5 files changed

+19
-1
lines changed

charts/cluster-autoscaler/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@ name: cluster-autoscaler
1111
sources:
1212
- https://github.com/kubernetes/autoscaler/tree/master/cluster-autoscaler
1313
type: application
14-
version: 9.46.6
14+
version: 9.46.7

charts/cluster-autoscaler/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -498,6 +498,7 @@ vpa:
498498
| prometheusRule.interval | string | `nil` | How often rules in the group are evaluated (falls back to `global.evaluation_interval` if not set). |
499499
| prometheusRule.namespace | string | `"monitoring"` | Namespace which Prometheus is running in. |
500500
| prometheusRule.rules | list | `[]` | Rules spec template (see https://github.com/prometheus-operator/prometheus-operator/blob/master/Documentation/api.md#rule). |
501+
| rbac.additionalRules | list | `[]` | Additional rules for role/clusterrole |
501502
| rbac.clusterScoped | bool | `true` | if set to false will only provision RBAC to alter resources in the current namespace. Most useful for Cluster-API |
502503
| rbac.create | bool | `true` | If `true`, create and use RBAC resources. |
503504
| rbac.pspEnabled | bool | `false` | If `true`, creates and uses RBAC resources required in the cluster with [Pod Security Policies](https://kubernetes.io/docs/concepts/policy/pod-security-policy/) enabled. Must be used with `rbac.create` set to `true`. |

charts/cluster-autoscaler/templates/clusterrole.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,4 +173,7 @@ rules:
173173
- patch
174174
- update
175175
{{- end }}
176+
{{- if .Values.rbac.additionalRules }}
177+
{{ toYaml .Values.rbac.additionalRules | indent 2 }}
178+
{{- end }}
176179
{{- end -}}

charts/cluster-autoscaler/templates/role.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,5 +83,8 @@ rules:
8383
verbs:
8484
- get
8585
- update
86+
{{- if .Values.rbac.additionalRules }}
87+
{{ toYaml .Values.rbac.additionalRules | indent 2}}
88+
{{- end }}
8689
{{- end }}
8790
{{- end -}}

charts/cluster-autoscaler/values.yaml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -366,6 +366,17 @@ rbac:
366366
name: ""
367367
# rbac.serviceAccount.automountServiceAccountToken -- Automount API credentials for a Service Account.
368368
automountServiceAccountToken: true
369+
# rbac.additionalRules -- Additional rules for role/clusterrole
370+
additionalRules: []
371+
# - apiGroups:
372+
# - infrastructure.cluster.x-k8s.io
373+
# resources:
374+
# - kubemarkmachinetemplates
375+
# verbs:
376+
# - get
377+
# - list
378+
# - watch
379+
369380

370381
# replicaCount -- Desired number of pods
371382
replicaCount: 1

0 commit comments

Comments
 (0)