Skip to content

Commit

Permalink
add Postgresql sslrootcert option
Browse files Browse the repository at this point in the history
  • Loading branch information
Joachim Burket committed Dec 10, 2024
1 parent 390c26f commit 4ab0dc6
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions charts/netbox/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,7 @@ The following table lists the configurable parameters for this chart and their d
| `externalDatabase.existingSecretName` | Fetch password for external PostgreSQL from a different `Secret` | `""` |
| `externalDatabase.existingSecretKey` | Key to fetch the password in the above `Secret` | `postgresql-password` |
| `externalDatabase.sslMode` | PostgreSQL client SSL Mode setting | `prefer` |
| `externalDatabase.sslRootCert` | PostgreSQL client SSL Root Certificate setting | `null` |
| `externalDatabase.connMaxAge` | The lifetime of a database connection, as an integer of seconds | `300` |
| `externalDatabase.disableServerSideCursors` | Disable the use of server-side cursors transaction pooling | `false` |
| `externalDatabase.targetSessionAttrs` | Determines whether the session must have certain properties | `read-write` |
Expand Down
3 changes: 3 additions & 0 deletions charts/netbox/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ data:
{{- end }}
OPTIONS:
sslmode: {{ .Values.externalDatabase.sslMode | quote }}
{{- if .Values.externalDatabase.sslRootCert }}
sslrootcert: {{ .Values.externalDatabase.sslRootCert | quote }}
{{- end}}
target_session_attrs: {{ .Values.externalDatabase.targetSessionAttrs | default "read-write" | quote }}
CONN_MAX_AGE: {{ .Values.externalDatabase.connMaxAge | int }}
DISABLE_SERVER_SIDE_CURSORS: {{ toJson .Values.externalDatabase.disableServerSideCursors }}
Expand Down
3 changes: 3 additions & 0 deletions charts/netbox/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -397,6 +397,9 @@
"sslMode": {
"type": "string"
},
"sslRootCert": {
"type": "string"
},
"targetSessionAttrs": {
"type": "string"
},
Expand Down
1 change: 1 addition & 0 deletions charts/netbox/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1028,6 +1028,7 @@ externalDatabase:

# The following settings also apply when using the bundled PostgreSQL chart:
sslMode: prefer
sslRootCert: ""
connMaxAge: 300
disableServerSideCursors: false
targetSessionAttrs: read-write
Expand Down

0 comments on commit 4ab0dc6

Please sign in to comment.