diff --git a/charts/netbox/README.md b/charts/netbox/README.md index 357beccb..24068e3f 100644 --- a/charts/netbox/README.md +++ b/charts/netbox/README.md @@ -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` | diff --git a/charts/netbox/templates/configmap.yaml b/charts/netbox/templates/configmap.yaml index 074d7103..df1b2872 100644 --- a/charts/netbox/templates/configmap.yaml +++ b/charts/netbox/templates/configmap.yaml @@ -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 }} diff --git a/charts/netbox/values.schema.json b/charts/netbox/values.schema.json index 7f71438b..42f2ac7d 100644 --- a/charts/netbox/values.schema.json +++ b/charts/netbox/values.schema.json @@ -397,6 +397,9 @@ "sslMode": { "type": "string" }, + "sslRootCert": { + "type": "string" + }, "targetSessionAttrs": { "type": "string" }, diff --git a/charts/netbox/values.yaml b/charts/netbox/values.yaml index b60fc66a..76121310 100644 --- a/charts/netbox/values.yaml +++ b/charts/netbox/values.yaml @@ -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