From 070580053488630d69b22c2d6f95e3cac944df6c Mon Sep 17 00:00:00 2001 From: Eldad Assis Date: Wed, 5 Sep 2018 22:31:17 +0300 Subject: [PATCH] Support controlling mission-control insight java memory settings --- .../templates/insight-executor-deployment.yaml | 12 ++++++++++++ .../templates/insight-scheduler-deployment.yaml | 12 ++++++++++++ stable/mission-control/values.yaml | 13 +++++++++++++ 3 files changed, 37 insertions(+) diff --git a/stable/mission-control/templates/insight-executor-deployment.yaml b/stable/mission-control/templates/insight-executor-deployment.yaml index ee585be97..b911b0308 100644 --- a/stable/mission-control/templates/insight-executor-deployment.yaml +++ b/stable/mission-control/templates/insight-executor-deployment.yaml @@ -38,6 +38,18 @@ spec: value: '/var/cloudbox' - name: JFI_HOME_EXECUTOR value: '/var/cloudbox/executor' + - name: JFMC_EXTRA_JAVA_OPTS + value: " + {{- if .Values.insightExecutor.javaOpts.other }} + {{ .Values.insightExecutor.javaOpts.other }} + {{- end}} + {{- if .Values.insightExecutor.javaOpts.xms }} + -Xms{{ .Values.insightExecutor.javaOpts.xms }} + {{- end}} + {{- if .Values.insightExecutor.javaOpts.xmx }} + -Xmx{{ .Values.insightExecutor.javaOpts.xmx }} + {{- end}} + " ports: - containerPort: {{ .Values.insightExecutor.internalPort }} protocol: TCP diff --git a/stable/mission-control/templates/insight-scheduler-deployment.yaml b/stable/mission-control/templates/insight-scheduler-deployment.yaml index eb5de0c39..8754c812f 100644 --- a/stable/mission-control/templates/insight-scheduler-deployment.yaml +++ b/stable/mission-control/templates/insight-scheduler-deployment.yaml @@ -68,6 +68,18 @@ spec: key: adminPassword - name: JFMC_SCHEDULER_MONGO_DB value: '{{ .Values.mongodb.db.insightSchedulerDb }}' + - name: JFMC_EXTRA_JAVA_OPTS + value: " + {{- if .Values.insightScheduler.javaOpts.other }} + {{ .Values.insightScheduler.javaOpts.other }} + {{- end}} + {{- if .Values.insightScheduler.javaOpts.xms }} + -Xms{{ .Values.insightScheduler.javaOpts.xms }} + {{- end}} + {{- if .Values.insightScheduler.javaOpts.xmx }} + -Xmx{{ .Values.insightScheduler.javaOpts.xmx }} + {{- end}} + " ports: - containerPort: {{ .Values.insightScheduler.internalPort }} protocol: TCP diff --git a/stable/mission-control/values.yaml b/stable/mission-control/values.yaml index f862bd123..b9eb8b086 100644 --- a/stable/mission-control/values.yaml +++ b/stable/mission-control/values.yaml @@ -210,6 +210,13 @@ insightScheduler: type: ClusterIP externalPort: 8080 internalPort: 8080 + + ## Control Java options (JAVA_OPTIONS) + ## IMPORTANT: keep javaOpts.xmx no higher than resources.limits.memory + javaOpts: {} + # other: + # xms: "500m" + # xmx: "3g" resources: {} # requests: # memory: "500Mi" @@ -253,6 +260,12 @@ insightExecutor: externalPort: 8080 internalPort: 8080 + ## Control Java options (JAVA_OPTIONS) + ## IMPORTANT: keep javaOpts.xmx no higher than resources.limits.memory + javaOpts: {} + # other: + # xms: "500m" + # xmx: "3g" resources: {} # requests: # memory: "500Mi"