From a14fc211f406e67082d03dd09bda8ee5f6a629b2 Mon Sep 17 00:00:00 2001 From: Ori Shoshan Date: Sun, 4 Feb 2024 19:52:47 +0100 Subject: [PATCH] Add explanation for username and password secret in PGSQL tutorial --- docs/quickstart/access-control/postgres.mdx | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/docs/quickstart/access-control/postgres.mdx b/docs/quickstart/access-control/postgres.mdx index 47ed11b2a..3d261516c 100644 --- a/docs/quickstart/access-control/postgres.mdx +++ b/docs/quickstart/access-control/postgres.mdx @@ -62,9 +62,18 @@ We will be using it to create a proxy to connect our locally running database to # Tutorial -### Deploy the cluster +### Deploy tutorial services and request database credentials +This will set up the namespace we will use for our tutorial and deploy the client, server, and database. -This will set up the namespace we will use for our tutorial and deploy the cluster with our client, server, and database. +Our server's Deployment spec will specify an annotation on the Pod, which requests that the credentials operator will provision a username and password for the server. +```yaml + template: + metadata: + annotations: + credentials-operator.otterize.com/user-password-secret-name: server-creds +``` +This specifies that the secret `server-creds` will have keys with the username and password to connect to the database. +The secret will only be created once the database is integrated with Otterize Cloud. ``` shell kubectl create namespace otterize-tutorial-postgres @@ -113,6 +122,7 @@ After providing a cluster name and environment. For this tutorial, choose: 3. Copy and run the Helm upgrade command. 4. You should see the Connection status change. + ### View logs for the server After the client, server, and database are up and running, we can see that the server does not have the appropriate access to the database by inspecting the logs with the following command.