Skip to content

Commit 99777f7

Browse files
feat: update docs postgres metadata (#4664)
Signed-off-by: nelson.parente <[email protected]>
1 parent 8135abd commit 99777f7

File tree

4 files changed

+117
-0
lines changed

4 files changed

+117
-0
lines changed

daprdocs/content/en/reference/components-reference/supported-bindings/postgresql.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,24 @@ The following metadata options are **required** to authenticate using a PostgreS
4141
|--------|:--------:|---------|---------|
4242
| `connectionString` | Y | The connection string for the PostgreSQL database. See the PostgreSQL [documentation on database connections](https://www.postgresql.org/docs/current/libpq-connect.html) for information on how to define a connection string. | `"host=localhost user=postgres password=example port=5432 connect_timeout=10 database=my_db"`
4343

44+
#### Authenticate using individual connection parameters
45+
46+
In addition to using a connection string, you can optionally specify individual connection parameters. These parameters are equivalent to the standard PostgreSQL connection parameters.
47+
48+
| Field | Required | Details | Example |
49+
|--------|:--------:|---------|---------|
50+
| `host` | Y | The host name or IP address of the PostgreSQL server | `"localhost"` |
51+
| `hostaddr` | N | The IP address of the PostgreSQL server (alternative to host) | `"127.0.0.1"` |
52+
| `port` | Y | The port number of the PostgreSQL server | `"5432"` |
53+
| `database` | Y | The name of the database to connect to | `"my_db"` |
54+
| `user` | Y | The PostgreSQL user to connect as | `"postgres"` |
55+
| `password` | Y | The password for the PostgreSQL user | `"example"` |
56+
| `sslRootCert` | N | Path to the SSL root certificate file | `"/path/to/ca.crt"` |
57+
58+
{{% alert title="Note" color="primary" %}}
59+
When using individual connection parameters, these will override the ones present in the `connectionString`.
60+
{{% /alert %}}
61+
4462
### Authenticate using Microsoft Entra ID
4563

4664
Authenticating with Microsoft Entra ID is supported with Azure Database for PostgreSQL. All authentication methods supported by Dapr can be used, including client credentials ("service principal") and Managed Identity.

daprdocs/content/en/reference/components-reference/supported-configuration-stores/postgresql-configuration-store.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,21 @@ spec:
2727
# Name of the table which holds configuration information
2828
- name: table
2929
value: "[your_configuration_table_name]"
30+
# Individual connection parameters - can be used instead to override connectionString parameters
31+
#- name: host
32+
# value: "localhost"
33+
#- name: hostaddr
34+
# value: "127.0.0.1"
35+
#- name: port
36+
# value: "5432"
37+
#- name: database
38+
# value: "my_db"
39+
#- name: user
40+
# value: "postgres"
41+
#- name: password
42+
# value: "example"
43+
#- name: sslRootCert
44+
# value: "/path/to/ca.crt"
3045
# Timeout for database operations, in seconds (optional)
3146
#- name: timeoutInSeconds
3247
# value: 20
@@ -67,6 +82,24 @@ The following metadata options are **required** to authenticate using a PostgreS
6782
|--------|:--------:|---------|---------|
6883
| `connectionString` | Y | The connection string for the PostgreSQL database. See the PostgreSQL [documentation on database connections](https://www.postgresql.org/docs/current/libpq-connect.html) for information on how to define a connection string. | `"host=localhost user=postgres password=example port=5432 connect_timeout=10 database=my_db"`
6984

85+
#### Authenticate using individual connection parameters
86+
87+
In addition to using a connection string, you can optionally specify individual connection parameters. These parameters are equivalent to the standard PostgreSQL connection parameters.
88+
89+
| Field | Required | Details | Example |
90+
|--------|:--------:|---------|---------|
91+
| `host` | Y | The host name or IP address of the PostgreSQL server | `"localhost"` |
92+
| `hostaddr` | N | The IP address of the PostgreSQL server (alternative to host) | `"127.0.0.1"` |
93+
| `port` | Y | The port number of the PostgreSQL server | `"5432"` |
94+
| `database` | Y | The name of the database to connect to | `"my_db"` |
95+
| `user` | Y | The PostgreSQL user to connect as | `"postgres"` |
96+
| `password` | Y | The password for the PostgreSQL user | `"example"` |
97+
| `sslRootCert` | N | Path to the SSL root certificate file | `"/path/to/ca.crt"` |
98+
99+
{{% alert title="Note" color="primary" %}}
100+
When using individual connection parameters, these will override the ones present in the `connectionString`.
101+
{{% /alert %}}
102+
70103
### Authenticate using Microsoft Entra ID
71104

72105
Authenticating with Microsoft Entra ID is supported with Azure Database for PostgreSQL. All authentication methods supported by Dapr can be used, including client credentials ("service principal") and Managed Identity.

daprdocs/content/en/reference/components-reference/supported-state-stores/setup-postgresql-v1.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,21 @@ spec:
3131
# Connection string
3232
- name: connectionString
3333
value: "<CONNECTION STRING>"
34+
# Individual connection parameters - can be used instead to override connectionString parameters
35+
#- name: host
36+
# value: "localhost"
37+
#- name: hostaddr
38+
# value: "127.0.0.1"
39+
#- name: port
40+
# value: "5432"
41+
#- name: database
42+
# value: "my_db"
43+
#- name: user
44+
# value: "postgres"
45+
#- name: password
46+
# value: "example"
47+
#- name: sslRootCert
48+
# value: "/path/to/ca.crt"
3449
# Timeout for database operations, as a Go duration or number of seconds (optional)
3550
#- name: timeout
3651
# value: 20
@@ -71,6 +86,24 @@ The following metadata options are **required** to authenticate using a PostgreS
7186
|--------|:--------:|---------|---------|
7287
| `connectionString` | Y | The connection string for the PostgreSQL database. See the PostgreSQL [documentation on database connections](https://www.postgresql.org/docs/current/libpq-connect.html) for information on how to define a connection string. | `"host=localhost user=postgres password=example port=5432 connect_timeout=10 database=my_db"` |
7388

89+
#### Authenticate using individual connection parameters
90+
91+
In addition to using a connection string, you can optionally specify individual connection parameters. These parameters are equivalent to the standard PostgreSQL connection parameters.
92+
93+
| Field | Required | Details | Example |
94+
|--------|:--------:|---------|---------|
95+
| `host` | Y | The host name or IP address of the PostgreSQL server | `"localhost"` |
96+
| `hostaddr` | N | The IP address of the PostgreSQL server (alternative to host) | `"127.0.0.1"` |
97+
| `port` | Y | The port number of the PostgreSQL server | `"5432"` |
98+
| `database` | Y | The name of the database to connect to | `"my_db"` |
99+
| `user` | Y | The PostgreSQL user to connect as | `"postgres"` |
100+
| `password` | Y | The password for the PostgreSQL user | `"example"` |
101+
| `sslRootCert` | N | Path to the SSL root certificate file | `"/path/to/ca.crt"` |
102+
103+
{{% alert title="Note" color="primary" %}}
104+
When using individual connection parameters, these will override the ones present in the `connectionString`.
105+
{{% /alert %}}
106+
74107
### Authenticate using Microsoft Entra ID
75108

76109
Authenticating with Microsoft Entra ID is supported with Azure Database for PostgreSQL. All authentication methods supported by Dapr can be used, including client credentials ("service principal") and Managed Identity.

daprdocs/content/en/reference/components-reference/supported-state-stores/setup-postgresql-v2.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,21 @@ spec:
3131
# Connection string
3232
- name: connectionString
3333
value: "<CONNECTION STRING>"
34+
# Individual connection parameters - can be used instead to override connectionString parameters
35+
#- name: host
36+
# value: "localhost"
37+
#- name: hostaddr
38+
# value: "127.0.0.1"
39+
#- name: port
40+
# value: "5432"
41+
#- name: database
42+
# value: "my_db"
43+
#- name: user
44+
# value: "postgres"
45+
#- name: password
46+
# value: "example"
47+
#- name: sslRootCert
48+
# value: "/path/to/ca.crt"
3449
# Timeout for database operations, as a Go duration or number of seconds (optional)
3550
#- name: timeout
3651
# value: 20
@@ -71,6 +86,24 @@ The following metadata options are **required** to authenticate using a PostgreS
7186
|--------|:--------:|---------|---------|
7287
| `connectionString` | Y | The connection string for the PostgreSQL database. See the PostgreSQL [documentation on database connections](https://www.postgresql.org/docs/current/libpq-connect.html) for information on how to define a connection string. | `"host=localhost user=postgres password=example port=5432 connect_timeout=10 database=my_db"` |
7388

89+
#### Authenticate using individual connection parameters
90+
91+
In addition to using a connection string, you can optionally specify individual connection parameters. These parameters are equivalent to the standard PostgreSQL connection parameters.
92+
93+
| Field | Required | Details | Example |
94+
|--------|:--------:|---------|---------|
95+
| `host` | Y | The host name or IP address of the PostgreSQL server | `"localhost"` |
96+
| `hostaddr` | N | The IP address of the PostgreSQL server (alternative to host) | `"127.0.0.1"` |
97+
| `port` | Y | The port number of the PostgreSQL server | `"5432"` |
98+
| `database` | Y | The name of the database to connect to | `"my_db"` |
99+
| `user` | Y | The PostgreSQL user to connect as | `"postgres"` |
100+
| `password` | Y | The password for the PostgreSQL user | `"example"` |
101+
| `sslRootCert` | N | Path to the SSL root certificate file | `"/path/to/ca.crt"` |
102+
103+
{{% alert title="Note" color="primary" %}}
104+
When using individual connection parameters, these will override the ones present in the `connectionString`.
105+
{{% /alert %}}
106+
74107
### Authenticate using Microsoft Entra ID
75108

76109
Authenticating with Microsoft Entra ID is supported with Azure Database for PostgreSQL. All authentication methods supported by Dapr can be used, including client credentials ("service principal") and Managed Identity.

0 commit comments

Comments
 (0)