1
0
mirror of https://github.com/openshift/openshift-docs.git synced 2026-02-05 12:46:18 +01:00
Files
openshift-docs/modules/odc-customizing-a-perspective-using-YAML-view.adoc
2023-10-30 10:13:25 -04:00

80 lines
1.9 KiB
Plaintext

// Module included in the following assembly:
//
// * web_console/customizing-the-web-console.adoc
:_mod-docs-content-type: PROCEDURE
[id="odc-customizing-a-perspective-using-YAML-view_{context}"]
= Customizing a perspective using YAML view
.Prerequisites
* You must have administrator privileges.
.Procedure
. In the *Administrator* perspective, navigate to *Administration* -> *Cluster Settings*.
. Select the *Configuration* tab and click the *Console (operator.openshift.io)* resource.
. Click the *YAML* tab and make your customization:
.. To enable or disable a perspective, insert the snippet for *Add user perspectives* and edit the YAML code as needed:
+
[source,yaml]
----
apiVersion: operator.openshift.io/v1
kind: Console
metadata:
name: cluster
spec:
customization:
perspectives:
- id: admin
visibility:
state: Enabled
- id: dev
visibility:
state: Enabled
----
.. To hide a perspective based on RBAC permissions, insert the snippet for *Hide user perspectives* and edit the YAML code as needed:
+
[source,yaml]
----
apiVersion: operator.openshift.io/v1
kind: Console
metadata:
name: cluster
spec:
customization:
perspectives:
- id: admin
requiresAccessReview:
- group: rbac.authorization.k8s.io
resource: clusterroles
verb: list
- id: dev
state: Enabled
----
.. To customize a perspective based on your needs, create your own YAML snippet:
+
[source,yaml]
----
apiVersion: operator.openshift.io/v1
kind: Console
metadata:
name: cluster
spec:
customization:
perspectives:
- id: admin
visibility:
state: AccessReview
accessReview:
missing:
- resource: deployment
verb: list
required:
- resource: namespaces
verb: list
- id: dev
visibility:
state: Enabled
----
. Click *Save*.