Skip to content

Commit

Permalink
Support custom rules for read-only mode (#7152)
Browse files Browse the repository at this point in the history
* Support custom rules for read-only mode

When dashboard is started with read-only role, CRDs are not shown in UI due to permissions issue.
This PR adds ability to provide custom rules for read-only role

* Update aio/deploy/helm-chart/kubernetes-dashboard/Chart.yaml

Co-authored-by: Cédric de Saint Martin <cdesaintmartin@wiremind.io>

Co-authored-by: Cédric de Saint Martin <cdesaintmartin@wiremind.io>
korjek and desaintmartin authored Aug 16, 2022

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
1 parent e322994 commit 4795a8f
Showing 3 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion aio/deploy/helm-chart/kubernetes-dashboard/Chart.yaml
Original file line number Diff line number Diff line change
@@ -14,7 +14,7 @@

apiVersion: v2
name: kubernetes-dashboard
version: 5.8.0
version: 5.9.0
appVersion: 2.6.1
description: General-purpose web UI for Kubernetes clusters
keywords:
Original file line number Diff line number Diff line change
@@ -151,4 +151,7 @@ rules:
- get
- list
- watch
{{- with .Values.rbac.clusterReadOnlyRoleAdditionalRules -}}
{{ toYaml . | nindent 2 }}
{{- end }}
{{- end -}}
3 changes: 3 additions & 0 deletions aio/deploy/helm-chart/kubernetes-dashboard/values.yaml
Original file line number Diff line number Diff line change
@@ -305,6 +305,9 @@ rbac:
#
# Independent from rbac.create parameter.
clusterReadOnlyRole: false
# It is possible to add additional rules if read only role is enabled.
# This can be useful, for example, to show CRD resources.
# clusterReadOnlyRoleAdditionalRules: []

serviceAccount:
# Specifies whether a service account should be created

0 comments on commit 4795a8f

Please sign in to comment.