Skip to content
Open
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion horizon/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 1.1.20
version: 1.1.21

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
Expand Down
32 changes: 20 additions & 12 deletions horizon/scripts/onms-core-init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,11 @@
# KAFKA_SASL_USERNAME
# KAFKA_SECURITY_PROTOCOL
# OPENNMS_ADMIN_PASS
# OPENNMS_DATABASE_CONNECTION_IDLETIMEOUT
# OPENNMS_DATABASE_CONNECTION_LOGINTIMEOUT
# OPENNMS_DATABASE_CONNECTION_MINPOOL
# OPENNMS_DATABASE_CONNECTION_MAXPOOL
# OPENNMS_DATABASE_CONNECTION_MAXSIZE
# OPENNMS_DBNAME
# OPENNMS_DBPASS
# OPENNMS_DBUSER
Expand Down Expand Up @@ -75,7 +79,11 @@ echo "OpenNMS Core Configuration Script..."
command -v rsync >/dev/null 2>&1 || { echo >&2 "rsync is required but it's not installed. Aborting."; exit 1; }

# Defaults
OPENNMS_DATABASE_CONNECTION_IDLETIMEOUT="${OPENNMS_DATABASE_CONNECTION_IDLETIMEOUT:-600}"
OPENNMS_DATABASE_CONNECTION_LOGINTIMEOUT="${OPENNMS_DATABASE_CONNECTION_LOGINTIMEOUT:-3}"
OPENNMS_DATABASE_CONNECTION_MINPOOL="${OPENNMS_DATABASE_CONNECTION_MINSIZE:-25}"
OPENNMS_DATABASE_CONNECTION_MAXPOOL="${OPENNMS_DATABASE_CONNECTION_MAXPOOL:-50}"
OPENNMS_DATABASE_CONNECTION_MAXSIZE="${OPENNMS_DATABASE_CONNECTION_MAXSIZE:-50}"
OPENNMS_WEB_BASEURL_SCHEME="${OPENNMS_WEB_BASEURL_SCHEME:-https}"
KAFKA_SASL_MECHANISM="${KAFKA_SASL_MECHANISM:-PLAIN}"
KAFKA_SECURITY_PROTOCOL="${KAFKA_SECURITY_PROTOCOL:-SASL_PLAINTEXT}"
Expand Down Expand Up @@ -309,11 +317,11 @@ cat <<EOF > ${CONFIG_DIR_OVERLAY}/opennms-datasources.xml
http://www.opennms.org/xsd/config/opennms-datasources.xsd ">

<connection-pool factory="org.opennms.core.db.HikariCPConnectionFactory"
idleTimeout="600"
loginTimeout="3"
minPool="50"
idleTimeout="${OPENNMS_DATABASE_CONNECTION_IDLETIMEOUT}"
loginTimeout="${OPENNMS_DATABASE_CONNECTION_LOGINTIMEOUT}"
minPool="${OPENNMS_DATABASE_CONNECTION_MINPOOL}"
maxPool="${OPENNMS_DATABASE_CONNECTION_MAXPOOL}"
maxSize="50" />
maxSize="${OPENNMS_DATABASE_CONNECTION_MAXSIZE}" />

<jdbc-data-source name="opennms"
database-name="${OPENNMS_DBNAME}"
Expand All @@ -331,10 +339,10 @@ cat <<EOF >> ${CONFIG_DIR_OVERLAY}/opennms-datasources.xml
url="jdbc:postgresql://${POSTGRES_HOST}:${POSTGRES_PORT}/template1?sslmode=${POSTGRES_SSL_MODE}&amp;sslfactory=${POSTGRES_SSL_FACTORY}"
user-name="${POSTGRES_USER}"
password="${POSTGRES_PASSWORD}">
<connection-pool idleTimeout="600"
minPool="0"
maxPool="10"
maxSize="50" />
<connection-pool idleTimeout="${OPENNMS_DATABASE_CONNECTION_IDLETIMEOUT}"
minPool="${OPENNMS_DATABASE_CONNECTION_MINPOOL}"
Copy link

Copilot AI Nov 12, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The minPool values for template1 and postgres datasources are now set to 25 (from the default), but were previously hardcoded to 0. This changes the behavior of these connection pools and may cause resource consumption issues. Consider using a separate environment variable for these datasources or documenting this breaking change.

Copilot uses AI. Check for mistakes.
maxPool="${OPENNMS_DATABASE_CONNECTION_MAXPOOL}"
maxSize="${OPENNMS_DATABASE_CONNECTION_MAXSIZE}" />
</jdbc-data-source>

<jdbc-data-source name="opennms-monitor"
Expand All @@ -343,10 +351,10 @@ cat <<EOF >> ${CONFIG_DIR_OVERLAY}/opennms-datasources.xml
url="jdbc:postgresql://${POSTGRES_HOST}:${POSTGRES_PORT}/postgres?sslmode=${POSTGRES_SSL_MODE}&amp;sslfactory=${POSTGRES_SSL_FACTORY}"
user-name="${POSTGRES_USER}"
password="${POSTGRES_PASSWORD}">
<connection-pool idleTimeout="600"
minPool="0"
maxPool="10"
maxSize="50" />
<connection-pool idleTimeout="${OPENNMS_DATABASE_CONNECTION_IDLETIMEOUT}"
minPool="${OPENNMS_DATABASE_CONNECTION_MINPOOL}"
Copy link

Copilot AI Nov 12, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The minPool values for template1 and postgres datasources are now set to 25 (from the default), but were previously hardcoded to 0. This changes the behavior of these connection pools and may cause resource consumption issues. Consider using a separate environment variable for these datasources or documenting this breaking change.

Copilot uses AI. Check for mistakes.
maxPool="${OPENNMS_DATABASE_CONNECTION_MAXPOOL}"
maxSize="${OPENNMS_DATABASE_CONNECTION_MAXSIZE}" />
</jdbc-data-source>
</datasource-configuration>
EOF
Expand Down