diff --git a/templates/core/core-cm.yaml b/templates/core/core-cm.yaml index 65237eb00..6bb418ea5 100644 --- a/templates/core/core-cm.yaml +++ b/templates/core/core-cm.yaml @@ -21,6 +21,8 @@ data: POSTGRESQL_SSLMODE: "{{ template "harbor.database.sslmode" . }}" POSTGRESQL_MAX_IDLE_CONNS: "{{ .Values.database.maxIdleConns }}" POSTGRESQL_MAX_OPEN_CONNS: "{{ .Values.database.maxOpenConns }}" + POSTGRESQL_CONN_MAX_LIFETIME: "{{ .Values.database.connMaxLifetime }}" + POSTGRESQL_CONN_MAX_IDLE_TIME: "{{ .Values.database.connMaxIdleTime }}" EXT_ENDPOINT: "{{ .Values.externalURL }}" CORE_URL: "{{ template "harbor.coreURL" . }}" JOBSERVICE_URL: "{{ template "harbor.jobserviceURL" . }}" @@ -84,4 +86,4 @@ data: {{- if .Values.core.quotaUpdateProvider }} QUOTA_UPDATE_PROVIDER: "{{ .Values.core.quotaUpdateProvider }}" - {{- end }} \ No newline at end of file + {{- end }} diff --git a/values.yaml b/values.yaml index e2c44a3a3..6e0355911 100644 --- a/values.yaml +++ b/values.yaml @@ -792,6 +792,13 @@ database: # If it <= 0, then there is no limit on the number of open connections. # Note: the default number of connections is 1024 for postgre of harbor. maxOpenConns: 900 + # The maximum amount of time a connection may be reused in seconds + #(core+exporter).Default is (5 minutes on exporter and 1h on core as per pgx defaults) + connMaxLifetime: 1h + # The maximum amount of time a connection can be idle before being closed in seconds (core+exporter). + # Default is (core as per pgx default 30 minutes and exporter 0) + connMaxIdleTime: 30m + ## Additional deployment annotations podAnnotations: {} ## Additional deployment labels