Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs wip #3

Merged
merged 1 commit into from
Aug 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions examples/8-postgres-gcp-managed/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# GCP Managed Postgres Example

By running the commands below, you deploy a ZITADEL instance configured to use a Google Cloud SQL managed Postgres database. The connection to the database is handled securely using the Cloud SQL Proxy.

> This example uses the Cloud SQL Proxy as a sidecar container to connect to the managed Postgres instance.

## Prerequisites

- A Google Cloud project with a Cloud SQL Postgres instance.
- A Kubernetes service account with the `Cloud SQL Client` role [Cloud SQL Client Role](https://cloud.google.com/sql/docs/mysql/connect-kubernetes-engine#workload-identity)

## Configuration

Update the `values.yaml` file with your Cloud SQL instance connection details e.g.:

```yaml
cloudSqlProxy:
enabled: true
imageTag: 2.12
instanceConnectionName: <gcp-project-id>:<region>:<instance-name>
args: ["--port=5432", "--structured-logs"]
resources:
requests:
memory: "100Mi"
cpu: "100m"
ephemeral-storage: "612Mi"
```

Make sure that the key `serviceAccount` `name` is set to the service account with the `Cloud SQL Client` role. E.g.

```yaml
serviceAccount:
create: false
name: <service-account-name>
```

35 changes: 35 additions & 0 deletions examples/8-postgres-gcp-managed/zitadel-values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
zitadel:
masterkey: x123456789012345678901234567891y
configmapConfig:
ExternalSecure: false
ExternalDomain: 127.0.0.1.sslip.io
TLS:
Enabled: false
Database:
Postgres:
Host: localhost # since we use cloud sql proxy
Port: 5432
Database: zitadel
MaxOpenConns: 20
MaxIdleConns: 10
MaxConnLifetime: 30m
MaxConnIdleTime: 5m
User:
Username: postgres
SSL:
Mode: disable
Admin:
Username: postgres
SSL:
Mode: disable

cloudSqlProxy:
enabled: true
imageTag: 2.12
instanceConnectionName: <gcp-project-id>:<region>:<instance-name>
args: ["--port=5432", "--structured-logs"]
resources:
requests:
memory: "100Mi"
cpu: "100m"
ephemeral-storage: "612Mi"