From 957e8722c3b86e99cc86fa72cfafd0c9111273cd Mon Sep 17 00:00:00 2001 From: MisguidedEmails <34784422+MisguidedEmails@users.noreply.github.com> Date: Wed, 3 Jan 2024 15:47:59 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=93=9D=20"*"=20can=20be=20used=20for=20UI?= =?UTF-8?q?=20TARGET=5FNAMESPACE=20option=20(#2412)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Similar to "WATCHED_NAMESPACE" for the operator itself, "*" is a valid option for the UI. Without it clusters in multiple namespaces - rather, those not in the TARGET_NAMESPACE - will not show in the UI. Which can be confusing for users. --- charts/postgres-operator-ui/values.yaml | 1 + docs/administrator.md | 2 ++ ui/manifests/deployment.yaml | 1 + 3 files changed, 4 insertions(+) diff --git a/charts/postgres-operator-ui/values.yaml b/charts/postgres-operator-ui/values.yaml index 23eae0c45..4a748ef34 100644 --- a/charts/postgres-operator-ui/values.yaml +++ b/charts/postgres-operator-ui/values.yaml @@ -45,6 +45,7 @@ envs: operatorApiUrl: "http://postgres-operator:8080" operatorClusterNameLabel: "cluster-name" resourcesVisible: "False" + # Set to "*" to allow viewing/creation of clusters in all namespaces targetNamespace: "default" teams: - "acid" diff --git a/docs/administrator.md b/docs/administrator.md index c44d08f90..33e9155df 100644 --- a/docs/administrator.md +++ b/docs/administrator.md @@ -1348,6 +1348,8 @@ You can also expose the operator API through a [service](https://github.com/zala Some displayed options can be disabled from UI using simple flags under the `OPERATOR_UI_CONFIG` field in the deployment. +The viewing and creation of clusters within the UI is limited to the namespace specified by the `TARGET_NAMESPACE` option. To allow the creation and viewing of clusters in all namespaces, set `TARGET_NAMESPACE` to `*`. + ### Deploy the UI on K8s Now, apply all manifests from the `ui/manifests` folder to deploy the Postgres diff --git a/ui/manifests/deployment.yaml b/ui/manifests/deployment.yaml index f6f452340..d5f4a3d5f 100644 --- a/ui/manifests/deployment.yaml +++ b/ui/manifests/deployment.yaml @@ -45,6 +45,7 @@ spec: - name: "RESOURCES_VISIBLE" value: "False" - name: "TARGET_NAMESPACE" + # Set to "*" to allow viewing/creation of clusters in all namespaces value: "default" - name: "TEAMS" value: |-