Skip to content

Commit

Permalink
feat: add java arguments to casa and fix typo (#632)
Browse files Browse the repository at this point in the history
  • Loading branch information
misba7 authored Apr 23, 2024
1 parent 2f53bb7 commit 7ac2227
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,19 @@ Create user custom defined secret envs
{{- end }}
{{- end }}

{{/*
Create GLUU_JAVA_OPTIONS ENV for passing custom work and detailed logs
*/}}
{{- define "casa.customJavaOptions"}}
{{ $custom := "" }}
{{ $custom = printf "%s" .Values.global.casa.gluuCustomJavaOptions }}
{{ $memory := .Values.resources.limits.memory | replace "Mi" "" | int -}}
{{- $maxDirectMemory := printf "-XX:MaxDirectMemorySize=%dm" $memory -}}
{{- $xmx := printf "-Xmx%dm" (sub $memory 300) -}}
{{- $customJavaOptions := printf "%s %s -DCN_IDP_HOST=http://oxshibboleth:8080" $custom (printf "%s %s" $maxDirectMemory $xmx) -}}
{{ $customJavaOptions | trim | quote }}
{{- end }}

{{/*
Create topologySpreadConstraints lists
*/}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,8 @@ spec:
runAsNonRoot: true
{{- end }}
env:
- name: GLUU_JAVA_OPTIONS
value: {{ include "casa.customJavaOptions" . | trim }}
{{- include "casa.usr-envs" . | indent 12 }}
{{- include "casa.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) }}
Expand Down
13 changes: 8 additions & 5 deletions pygluu/kubernetes/templates/helm/gluu/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,9 @@ global:
azureStorageAccountType: Standard_LRS
# -- Azure storage kind if using Azure disks
azureStorageKind: Managed
casa:
# -- passing custom java options to casa. DO NOT PASS GLUU_JAVA_OPTIONS in envs.
gluuCustomJavaOptions: ""
# -- The Loadbalancer IP created by nginx or istio on clouds that provide static IPs. This is not needed if `global.domain` is globally resolvable.
lbIp: 22.22.22.22
# -- Fully qualified domain name to be used for Gluu installation. This address will be used to reach Gluu services.
Expand Down Expand Up @@ -135,7 +138,7 @@ global:
oxauth:
# -- Boolean flag to enable/disable oxauth chart. You should never set this to false.
enabled: true
# -- passing custom java options to oxauth. Notice you do not need to pass in any loggers optoins as they are introduced below in appLoggers. DO NOT PASS GLUU_JAVA_OPTIONS in envs.
# -- passing custom java options to oxauth. Notice you do not need to pass in any loggers options as they are introduced below in appLoggers. DO NOT PASS GLUU_JAVA_OPTIONS in envs.
gluuCustomJavaOptions: ""
# -- App loggers can be configured to define where the logs will be redirected to and the level of each in which it should be displayed.
# log levels are "OFF", "FATAL", "ERROR", "WARN", "INFO", "DEBUG", "TRACE"
Expand Down Expand Up @@ -178,7 +181,7 @@ global:
fido2:
# -- Boolean flag to enable/disable the fido2 chart.
enabled: false
# -- passing custom java options to fido2. Notice you do not need to pass in any loggers optoins as they are introduced below in appLoggers. DO NOT PASS GLUU_JAVA_OPTIONS in envs.
# -- passing custom java options to fido2. Notice you do not need to pass in any loggers options as they are introduced below in appLoggers. DO NOT PASS GLUU_JAVA_OPTIONS in envs.
gluuCustomJavaOptions: ""
# -- App loggers can be configured to define where the logs will be redirected to and the level of each in which it should be displayed.
# log levels are "OFF", "FATAL", "ERROR", "WARN", "INFO", "DEBUG", "TRACE"
Expand All @@ -197,7 +200,7 @@ global:
scim:
# -- Boolean flag to enable/disable the SCIM chart.
enabled: false
# -- passing custom java options to scim. Notice you do not need to pass in any loggers optoins as they are introduced below in appLoggers. DO NOT PASS GLUU_JAVA_OPTIONS in envs.
# -- passing custom java options to scim. Notice you do not need to pass in any loggers options as they are introduced below in appLoggers. DO NOT PASS GLUU_JAVA_OPTIONS in envs.
gluuCustomJavaOptions: ""
# -- App loggers can be configured to define where the logs will be redirected to and the level of each in which it should be displayed.
# log levels are "OFF", "FATAL", "ERROR", "WARN", "INFO", "DEBUG", "TRACE"
Expand Down Expand Up @@ -305,7 +308,7 @@ global:
oxshibboleth:
# -- Boolean flag to enable/disable the oxShibbboleth chart.
enabled: false
# -- passing custom java options to oxShibboleth. Notice you do not need to pass in any loggers optoins as they are introduced below in appLoggers. DO NOT PASS GLUU_JAVA_OPTIONS in envs.
# -- passing custom java options to oxShibboleth. Notice you do not need to pass in any loggers options as they are introduced below in appLoggers. DO NOT PASS GLUU_JAVA_OPTIONS in envs.
gluuCustomJavaOptions: ""
# -- App loggers can be configured to define where the logs will be redirected to and the level of each in which it should be displayed.
# log levels are "OFF", "FATAL", "ERROR", "WARN", "INFO", "DEBUG", "TRACE"
Expand Down Expand Up @@ -343,7 +346,7 @@ global:
oxd-server:
# -- Boolean flag to enable/disable the oxd-server chart.
enabled: true
# -- passing custom java options to oxShibboleth. Notice you do not need to pass in any loggers optoins as they are introduced below in appLoggers. DO NOT PASS GLUU_JAVA_OPTIONS in envs.
# -- passing custom java options to oxShibboleth. Notice you do not need to pass in any loggers options as they are introduced below in appLoggers. DO NOT PASS GLUU_JAVA_OPTIONS in envs.
gluuCustomJavaOptions: ""
# -- App loggers can be configured to define where the logs will be redirected to and the level of each in which it should be displayed.
# log levels are "OFF", "FATAL", "ERROR", "WARN", "INFO", "DEBUG", "TRACE"
Expand Down

0 comments on commit 7ac2227

Please sign in to comment.