diff --git a/pygluu/kubernetes/templates/helm/gluu/charts/fido2/templates/deployment.yml b/pygluu/kubernetes/templates/helm/gluu/charts/fido2/templates/deployment.yml index bae157d4..7aaf8ed1 100644 --- a/pygluu/kubernetes/templates/helm/gluu/charts/fido2/templates/deployment.yml +++ b/pygluu/kubernetes/templates/helm/gluu/charts/fido2/templates/deployment.yml @@ -73,6 +73,8 @@ spec: runAsNonRoot: true {{- end }} env: + - name: GLUU_JAVA_OPTIONS + value: "-XX:MaxDirectMemorySize={{ (.Values.resources.limits.memory | replace "Mi" "") }}m -Xmx{{sub (.Values.resources.limits.memory | replace "Mi" "") 300}}m" {{- include "fido2.usr-envs" . | indent 12 }} {{- include "fido2.usr-secret-envs" . | indent 12 }} {{- if and (eq .Values.global.isDomainRegistered "false") (or (eq .Values.global.storageClass.provisioner "kubernetes.io/aws-ebs") (eq .Values.global.storageClass.provisioner "openebs.io/local")) }} diff --git a/pygluu/kubernetes/templates/helm/gluu/charts/oxauth/templates/deployment.yml b/pygluu/kubernetes/templates/helm/gluu/charts/oxauth/templates/deployment.yml index d3cc41d9..f27381f0 100644 --- a/pygluu/kubernetes/templates/helm/gluu/charts/oxauth/templates/deployment.yml +++ b/pygluu/kubernetes/templates/helm/gluu/charts/oxauth/templates/deployment.yml @@ -71,6 +71,8 @@ spec: runAsNonRoot: true {{- end }} env: + - name: GLUU_JAVA_OPTIONS + value: "-XX:MaxDirectMemorySize={{ (.Values.resources.limits.memory | replace "Mi" "") }}m -Xmx{{sub (.Values.resources.limits.memory | replace "Mi" "") 300}}m" {{- include "oxauth.usr-envs" . | indent 12 }} {{- include "oxauth.usr-secret-envs" . | indent 12 }} {{- if or (eq .Values.global.storageClass.provisioner "kubernetes.io/aws-ebs") (eq .Values.global.storageClass.provisioner "openebs.io/local") ( .Values.customScripts) }} diff --git a/pygluu/kubernetes/templates/helm/gluu/charts/oxd-server/templates/deployment.yaml b/pygluu/kubernetes/templates/helm/gluu/charts/oxd-server/templates/deployment.yaml index 8e7502bc..b2735036 100644 --- a/pygluu/kubernetes/templates/helm/gluu/charts/oxd-server/templates/deployment.yaml +++ b/pygluu/kubernetes/templates/helm/gluu/charts/oxd-server/templates/deployment.yaml @@ -72,6 +72,8 @@ spec: runAsNonRoot: true {{- end }} env: + - name: GLUU_JAVA_OPTIONS + value: "-XX:MaxDirectMemorySize={{ (.Values.resources.limits.memory | replace "Mi" "") }}m -Xmx{{sub (.Values.resources.limits.memory | replace "Mi" "") 300}}m" {{- include "oxd-server.usr-envs" . | indent 12 }} {{- include "oxd-server.usr-secret-envs" . | indent 12 }} imagePullPolicy: {{ .Values.image.pullPolicy }} diff --git a/pygluu/kubernetes/templates/helm/gluu/charts/oxshibboleth/templates/_helpers.tpl b/pygluu/kubernetes/templates/helm/gluu/charts/oxshibboleth/templates/_helpers.tpl index eda8b796..cc7be205 100644 --- a/pygluu/kubernetes/templates/helm/gluu/charts/oxshibboleth/templates/_helpers.tpl +++ b/pygluu/kubernetes/templates/helm/gluu/charts/oxshibboleth/templates/_helpers.tpl @@ -81,6 +81,7 @@ Create GLUU_JAVA_OPTIONS ENV for passing custom work and detailed logs {{ $container := "" }} {{ $xmlsec := "" }} {{ $custom := "" }} +{{- $custom := printf "-XX:MaxDirectMemorySize=%sm -Xmx%s" (.Values.resources.limits.memory | replace "Mi" "") (sub (.Values.resources.limits.memory | replace "Mi" "") 300) }} {{- if .Values.global.oxshibboleth.gluuCustomJavaOptions }} {{ $custom = printf "%s " .Values.global.oxshibboleth.gluuCustomJavaOptions }} {{- end}} diff --git a/pygluu/kubernetes/templates/helm/gluu/charts/oxtrust/templates/_helpers.tpl b/pygluu/kubernetes/templates/helm/gluu/charts/oxtrust/templates/_helpers.tpl index 89e80a68..d8b8a680 100644 --- a/pygluu/kubernetes/templates/helm/gluu/charts/oxtrust/templates/_helpers.tpl +++ b/pygluu/kubernetes/templates/helm/gluu/charts/oxtrust/templates/_helpers.tpl @@ -73,6 +73,7 @@ Create GLUU_JAVA_OPTIONS ENV for passing custom work and detailed logs */}} {{- define "oxtrust.customJavaOptions"}} {{ $custom := "" }} +{{- $custom := printf "-XX:MaxDirectMemorySize=%sm -Xmx%s" (.Values.resources.limits.memory | replace "Mi" "") (sub (.Values.resources.limits.memory | replace "Mi" "") 300) }} {{- if .Values.global.oxtrust.gluuCustomJavaOptions }} {{ $custom = printf "%s" .Values.global.oxtrust.gluuCustomJavaOptions }} {{- end}} diff --git a/pygluu/kubernetes/templates/helm/gluu/charts/scim/templates/deployment.yml b/pygluu/kubernetes/templates/helm/gluu/charts/scim/templates/deployment.yml index e7389284..c4933afa 100644 --- a/pygluu/kubernetes/templates/helm/gluu/charts/scim/templates/deployment.yml +++ b/pygluu/kubernetes/templates/helm/gluu/charts/scim/templates/deployment.yml @@ -73,6 +73,8 @@ spec: runAsNonRoot: true {{- end }} env: + - name: GLUU_JAVA_OPTIONS + value: "-XX:MaxDirectMemorySize={{ (.Values.resources.limits.memory | replace "Mi" "") }}m -Xmx{{sub (.Values.resources.limits.memory | replace "Mi" "") 300}}m" {{- include "scim.usr-envs" . | indent 12 }} {{- include "scim.usr-secret-envs" . | indent 12 }} {{- if or (eq .Values.global.storageClass.provisioner "kubernetes.io/aws-ebs") (eq .Values.global.storageClass.provisioner "openebs.io/local") ( .Values.customScripts) }}