Skip to content

Commit

Permalink
NMS-16365: Dynamically scaling heap memory size (#59)
Browse files Browse the repository at this point in the history
* clean up extra resource declaration

* update the Charts version

* Remove hard coded min,max memory and allow users to pass JAVA_OPTS

* update readme.md file

* fix spacing in readme file

* fix readme file

* remove extra fsGroup and expand the ifstatement for java opts
  • Loading branch information
mershad-manesh authored Mar 11, 2024
1 parent 445bbec commit cf5d5ff
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 11 deletions.
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.12
version: 1.1.13

# 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
4 changes: 0 additions & 4 deletions horizon/templates/opennms-core.statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,6 @@ spec:
capabilities:
drop:
- ALL
{{- else }}
fsGroup: 10001
{{- end }}
command: [ bash, /scripts/onms-core-init.sh ]
envFrom:
Expand Down Expand Up @@ -161,8 +159,6 @@ spec:
drop:
- ALL
{{- end }}
{{- else }}
fsGroup: 10001
{{- end }}
imagePullPolicy: {{ .Values.core.image.pullPolicy }}
args:
Expand Down
2 changes: 1 addition & 1 deletion minion/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.12
version: 1.1.13

# 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
1 change: 1 addition & 0 deletions minion/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ echo "Hello World" > etc/hello.txt
| minion.image.pullPolicy | string | `"IfNotPresent"` | |
| minion.image.repository | string | `"opennms/minion"` | |
| minion.image.tag | string | `""` | |
| minion.javaOpts | string | `""` | |
| minion.kafkaBroker.address | string | `"onms-kafka-bootstrap.shared.svc:9093"` | |
| minion.kafkaBroker.password | string | `""` | |
| minion.kafkaBroker.username | string | `""` | |
Expand Down
14 changes: 9 additions & 5 deletions minion/templates/minion-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,17 @@ spec:
value: /usr/lib/jvm/java-nocap
{{- end }}
{{- end }}
- name: JAVA_MAX_MEM
value: 2048M
- name: JAVA_MIN_MEM
value: 512M
{{- if .Values.truststore.content }}
{{- if or (.Values.minion.javaOpts) (.Values.truststore.content) }}
- name: JAVA_OPTS
{{- if .Values.truststore.content }}
{{- if .Values.minion.javaOpts }}
value: -Djavax.net.ssl.trustStore=/etc/java/jks/truststore.jks -Djavax.net.ssl.trustStorePassword={{ .Values.truststore.password }} {{ .Values.minion.javaOpts }}
{{- else }}
value: -Djavax.net.ssl.trustStore=/etc/java/jks/truststore.jks -Djavax.net.ssl.trustStorePassword={{ .Values.truststore.password }}
{{- end }}
{{- else }}
value: {{ .Values.minion.javaOpts }}
{{- end }}
{{- end }}
- name: TZ
value: America/New_York
Expand Down
1 change: 1 addition & 0 deletions minion/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ minion:
requests:
cpu: '2'
memory: 4Gi
javaOpts: ''


core:
Expand Down

0 comments on commit cf5d5ff

Please sign in to comment.