Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Léo Colombaro <LeoColomb@users.noreply.github.com>
  • Loading branch information
joachimBurket and LeoColomb authored Dec 18, 2024
1 parent 809b59e commit 57918a3
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 12 deletions.
4 changes: 1 addition & 3 deletions charts/netbox/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -208,11 +208,9 @@ The following table lists the configurable parameters for this chart and their d
| `externalDatabase.password` | Password for external PostgreSQL (see also `existingSecret`) | `""` |
| `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 | `""` |
| `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` |
| `externalDatabase.options` | Additional PostgreSQL client parameters | `{}` |
| `redis.enabled` | Deploy Redis using bundled Bitnami Redis chart | `true` |
| `redis.*` | Values under this key are passed to the bundled Redis chart | n/a |
| `tasksRedis.database` | Redis database number used for NetBox task queue | `0` |
Expand Down
7 changes: 1 addition & 6 deletions charts/netbox/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,7 @@ data:
NAME: {{ .Values.externalDatabase.database | quote }}
PORT: {{ .Values.externalDatabase.port | int }}
{{- 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 }}
OPTIONS: {{- include "common.tplvalues.render" (dict "value" .Values.externalDatabase.options "context" $) | nindent 8 }}
CONN_MAX_AGE: {{ .Values.externalDatabase.connMaxAge | int }}
DISABLE_SERVER_SIDE_CURSORS: {{ toJson .Values.externalDatabase.disableServerSideCursors }}
Expand Down
9 changes: 6 additions & 3 deletions charts/netbox/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1027,11 +1027,14 @@ externalDatabase:
existingSecretKey: postgresql-password

# The following settings also apply when using the bundled PostgreSQL chart:
sslMode: prefer
sslRootCert: ""
connMaxAge: 300
disableServerSideCursors: false
targetSessionAttrs: read-write
## @param externalDatabase.options Additional PostgreSQL client parameters
## Ref: https://www.postgresql.org/docs/current/libpq-connect.html#LIBPQ-PARAMKEYWORDS
##
options:
sslmode: "prefer"
target_session_attrs: "read-write"

## Redis chart configuration
## https://github.com/bitnami/charts/blob/main/bitnami/redis/values.yaml
Expand Down

0 comments on commit 57918a3

Please sign in to comment.