Skip to content

Commit 0657036

Browse files
liboth0th
andauthored
feat: add postgres.ssl_mode value (#21)
- Add `postgres.ssl_mode` to values.yaml, values.schema.json, and README.md for configurable Postgres SSL mode - Update configmap-listmonk.yaml to use `.Values.postgres.ssl_mode` Co-authored-by: Gokhan <[email protected]>
1 parent 61f536f commit 0657036

File tree

4 files changed

+40
-24
lines changed

4 files changed

+40
-24
lines changed

charts/listmonk/README.md

Lines changed: 24 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -26,26 +26,27 @@ $ helm uninstall --namespace listmonk listmonk
2626

2727
## Values
2828

29-
| Key | Type | Default | Description |
30-
| ---------------------------------- | ------ | --------------------- | ----------------------------------------------------------------- |
31-
| ingress.annotations | object | `{}` | annotations for the ingress |
32-
| ingress.enabled | bool | `false` | enable the ingress |
33-
| ingress.className | string | `""` | ingress class name |
34-
| ingress.host | string | `"listmonk.local"` | host for the ingress |
35-
| ingress.tls | list | `[]` | tls configuration for the ingress |
36-
| listmonk.admin.password | string | `""` | the admin password |
37-
| listmonk.admin.username | string | `""` | the admin username |
38-
| listmonk.image.repository | string | `"listmonk/listmonk"` | the listmonk image repository |
39-
| listmonk.image.tag | string | `"v5.0.0"` | the listmonk image tag |
40-
| listmonk.replicas | int | `1` | the number of listmonk deployment replicas |
41-
| postgres.database | string | `"listmonk"` | the postgres database name |
42-
| postgres.enabled | bool | `true` | enable internal postgres |
43-
| postgres.existingSecret | string | `""` | name of an existing Kubernetes Secret with database credentials |
44-
| postgres.existingSecretPasswordKey | string | `""` | key in existingSecret for the database password (required if set) |
45-
| postgres.existingSecretUsernameKey | string | `""` | key in existingSecret for the database username (required if set) |
46-
| postgres.hostname | string | `""` | external postgres hostname (used when postgres.enabled is false) |
47-
| postgres.image.repository | string | `"postgres"` | the postgres image repository |
48-
| postgres.image.tag | string | `"16-alpine"` | the postgres image tag |
49-
| postgres.password | string | `""` | the postgres password (used if existingSecret is not set) |
50-
| postgres.resources | object | `{}` | resources configuration for the postgres statefulset |
51-
| postgres.user | string | `"listmonk"` | the postgres username (used if existingSecret is not set) |
29+
| Key | Type | Default | Description |
30+
| ---------------------------------- | ------ | --------------------- | -------------------------------------------------------------------------------------------------------------- |
31+
| ingress.annotations | object | `{}` | annotations for the ingress |
32+
| ingress.enabled | bool | `false` | enable the ingress |
33+
| ingress.className | string | `""` | ingress class name |
34+
| ingress.host | string | `"listmonk.local"` | host for the ingress |
35+
| ingress.tls | list | `[]` | tls configuration for the ingress |
36+
| listmonk.admin.password | string | `""` | the admin password |
37+
| listmonk.admin.username | string | `""` | the admin username |
38+
| listmonk.image.repository | string | `"listmonk/listmonk"` | the listmonk image repository |
39+
| listmonk.image.tag | string | `"v5.0.0"` | the listmonk image tag |
40+
| listmonk.replicas | int | `1` | the number of listmonk deployment replicas |
41+
| postgres.database | string | `"listmonk"` | the postgres database name |
42+
| postgres.enabled | bool | `true` | enable internal postgres |
43+
| postgres.existingSecret | string | `""` | name of an existing Kubernetes Secret with database credentials |
44+
| postgres.existingSecretPasswordKey | string | `""` | key in existingSecret for the database password (required if set) |
45+
| postgres.existingSecretUsernameKey | string | `""` | key in existingSecret for the database username (required if set) |
46+
| postgres.hostname | string | `""` | external postgres hostname (used when postgres.enabled is false) |
47+
| postgres.image.repository | string | `"postgres"` | the postgres image repository |
48+
| postgres.image.tag | string | `"16-alpine"` | the postgres image tag |
49+
| postgres.password | string | `""` | the postgres password (used if existingSecret is not set) |
50+
| postgres.resources | object | `{}` | resources configuration for the postgres statefulset |
51+
| postgres.ssl_mode | string | `"disable"` | the SSL mode for postgres connection. Possible values: allow, disable, prefer, require, verify-ca, verify-full |
52+
| postgres.user | string | `"listmonk"` | the postgres username (used if existingSecret is not set) |

charts/listmonk/templates/configmap-listmonk.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ data:
1717
{{- end }}
1818
port = 5432
1919
database = "{{ .Values.postgres.database }}"
20-
ssl_mode = "disable"
20+
ssl_mode = "{{ .Values.postgres.ssl_mode }}"
2121
max_open = 25
2222
max_idle = 25
2323
max_lifetime = "300s"

charts/listmonk/values.schema.json

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,19 @@
9393
},
9494
"user": {
9595
"type": "string"
96+
},
97+
"ssl_mode": {
98+
"type": "string",
99+
"description": "The SSL mode for postgres connection. Possible values: allow, disable, prefer, require, verify-ca, verify-full",
100+
"default": "disable",
101+
"enum": [
102+
"allow",
103+
"disable",
104+
"prefer",
105+
"require",
106+
"verify-ca",
107+
"verify-full"
108+
]
96109
}
97110
},
98111
"type": "object"

charts/listmonk/values.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,3 +43,5 @@ postgres:
4343
resources: {} # @schema $ref: https://raw.githubusercontent.com/yannh/kubernetes-json-schema/refs/heads/master/v1.31.6/resourcerequirements.json ; skipProperties: true
4444
# -- the postgres username
4545
user: "listmonk"
46+
# -- the SSL mode for postgres connection. Possible values: disable, allow, prefer, require, verify-ca, verify-full
47+
ssl_mode: "disable"

0 commit comments

Comments
 (0)