From 86cc32be95a5fcab175c55852e73f3d21b2a0bad Mon Sep 17 00:00:00 2001 From: Roman Gherta Date: Thu, 18 Jan 2024 11:19:13 +0100 Subject: [PATCH 1/3] pgadmin config examples --- kustomize/pgadmin/kustomization.yaml | 7 ++++++ kustomize/pgadmin/pgadmin.yaml | 35 ++++++++++++++++++++++++++++ 2 files changed, 42 insertions(+) create mode 100644 kustomize/pgadmin/kustomization.yaml create mode 100644 kustomize/pgadmin/pgadmin.yaml diff --git a/kustomize/pgadmin/kustomization.yaml b/kustomize/pgadmin/kustomization.yaml new file mode 100644 index 00000000..79177b28 --- /dev/null +++ b/kustomize/pgadmin/kustomization.yaml @@ -0,0 +1,7 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization + +namespace: postgres-operator + +resources: +- pgadmin.yaml \ No newline at end of file diff --git a/kustomize/pgadmin/pgadmin.yaml b/kustomize/pgadmin/pgadmin.yaml new file mode 100644 index 00000000..27f0a4b1 --- /dev/null +++ b/kustomize/pgadmin/pgadmin.yaml @@ -0,0 +1,35 @@ +apiVersion: postgres-operator.crunchydata.com/v1beta1 +kind: PGAdmin +metadata: + name: rhino + namespace: postgres-operator +spec: + dataVolumeClaimSpec: + accessModes: + - "ReadWriteOnce" + resources: + requests: + storage: 1Gi + serverGroups: + - name: supply + # An empty selector selects all postgresclusters in the Namespace + postgresClusterSelector: {} + config: + settings: + AUTHENTICATION_SOURCES: ['oauth2', 'internal'] + OAUTH2_CONFIG: + - OAUTH2_NAME: "google" + OAUTH2_DISPLAY_NAME: "Google" + OAUTH2_CLIENT_ID: "XXXXXXX" + OAUTH2_CLIENT_SECRET: "XXXXXXX" + OAUTH2_TOKEN_URL: "https://oauth2.googleapis.com/token" + OAUTH2_AUTHORIZATION_URL: "https://accounts.google.com/o/oauth2/auth" + OAUTH2_API_BASE_URL: "https://openidconnect.googleapis.com/v1/" + OAUTH2_SERVER_METADATA_URL: "https://accounts.google.com/.well-known/openid-configuration" + OAUTH2_SCOPE: "openid email profile" + OAUTH2_USERINFO_ENDPOINT: "userinfo" + OAUTH2_SSL_CERT_VERIFICATION: "False" # for testing purposes + OAUTH2_BUTTON_COLOR: "red" + OAUTH2_AUTO_CREATE_USER : "True" + DEBUG: "True" # for testing purposes + SERVER_MODE: "True" From 3e637dbbdce27c5bb9ef23d0cede02d1e1191826 Mon Sep 17 00:00:00 2001 From: Roman Gherta Date: Thu, 29 Feb 2024 13:16:42 +0100 Subject: [PATCH 2/3] lint and readme --- kustomize/pgadmin/README.md | 8 ++++++++ kustomize/pgadmin/kustomization.yaml | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 kustomize/pgadmin/README.md diff --git a/kustomize/pgadmin/README.md b/kustomize/pgadmin/README.md new file mode 100644 index 00000000..eaa0007d --- /dev/null +++ b/kustomize/pgadmin/README.md @@ -0,0 +1,8 @@ +# Pgadmin considerations + +Starting with **PGO v5.5.0** the user interface has its own CRD. You have better control and can fully customize your user interface via PGAdmin.spec.config.settings as demonstrated in the included pgadmin.yaml + +For more architectural insights please refer to [docs](https://access.crunchydata.com/documentation/postgres-operator/latest/architecture/namespace-scoped-pgadmin-4) + +For a list of possible pgadmin settings refer to [pgadmin docs](https://www.pgadmin.org/docs/pgadmin4/latest/config_py.html) + diff --git a/kustomize/pgadmin/kustomization.yaml b/kustomize/pgadmin/kustomization.yaml index 79177b28..600eb8b8 100644 --- a/kustomize/pgadmin/kustomization.yaml +++ b/kustomize/pgadmin/kustomization.yaml @@ -4,4 +4,4 @@ kind: Kustomization namespace: postgres-operator resources: -- pgadmin.yaml \ No newline at end of file +- pgadmin.yaml From 5de20a0555972f577931f1b7345482be51ffcbc0 Mon Sep 17 00:00:00 2001 From: Roman Gherta Date: Thu, 29 Feb 2024 13:19:33 +0100 Subject: [PATCH 3/3] newline --- kustomize/pgadmin/kustomization.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/kustomize/pgadmin/kustomization.yaml b/kustomize/pgadmin/kustomization.yaml index 600eb8b8..d0724ecd 100644 --- a/kustomize/pgadmin/kustomization.yaml +++ b/kustomize/pgadmin/kustomization.yaml @@ -5,3 +5,4 @@ namespace: postgres-operator resources: - pgadmin.yaml +