diff --git a/src/common/Chart.yaml b/src/common/Chart.yaml index 8828d0f..798e32d 100644 --- a/src/common/Chart.yaml +++ b/src/common/Chart.yaml @@ -15,7 +15,7 @@ type: library # 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.3.70 +version: 1.3.71 # 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 diff --git a/src/common/templates/_jfr-helper.tpl b/src/common/templates/_jfr-helper.tpl index 4fb37fa..3067a2c 100644 --- a/src/common/templates/_jfr-helper.tpl +++ b/src/common/templates/_jfr-helper.tpl @@ -4,12 +4,6 @@ USAGE: */}} {{- define "harnesscommon.jfr.v1.renderEnvironmentVars" }} {{- $ := .ctx }} -{{- $waitTime := "20" }} -{{- if hasKey $.Values "jfr" }} - {{- if hasKey $.Values.jfr "sleep" }} - {{- $waitTime = $.Values.jfr.sleep }} - {{- end }} -{{- end }} {{- if $.Values.global.jfr.enabled }} - name: POD_NAME valueFrom: @@ -21,8 +15,6 @@ USAGE: value: {{ default "default" $.Values.envType }} - name: JFR_DUMP_ROOT_LOCATION value: {{ default "/opt/harness" $.Values.jfrDumpRootLocation }} -- name: WAIT_TIME - value: {{ $waitTime }} {{- end }} {{- end }} @@ -50,7 +42,7 @@ preStop: - -c - | touch shutdown; - sleep ${WAIT_TIME}; + sleep 20; ts=$(date '+%s'); loc=${JFR_DUMP_ROOT_LOCATION}/dumps/${SERVICE_NAME}/${ENV_TYPE}/$ts/${POD_NAME}; mkdir -p $loc; sleep 1; echo $ts > $loc/restart; @@ -115,25 +107,7 @@ USAGE: {{- $ := .ctx }} {{- $javaAdvancedFlags := default "" $.Values.javaAdvancedFlags }} {{- $jfrDumpRootLocation := default "/opt/harness" $.Values.jfrDumpRootLocation }} -{{- $maxage := "12h" }} -{{- $jfcFilePath := "/opt/harness/profile.jfc" }} -{{- $maxchunksize := "20M" }} -{{- $memorysize := "20M" }} -{{- if hasKey $.Values "jfr" }} - {{- if hasKey $.Values.jfr "maxage" }} - {{- $maxage = $.Values.jfr.maxage }} - {{- end }} - {{- if hasKey $.Values.jfr "jfcFilePath" }} - {{- $jfcFilePath = $.Values.jfr.jfcFilePath }} - {{- end }} - {{- if hasKey $.Values.jfr "maxchunksize" }} - {{- $maxchunksize = $.Values.jfr.maxchunksize }} - {{- end }} - {{- if hasKey $.Values.jfr "memorysize" }} - {{- $memorysize = $.Values.jfr.memorysize }} - {{- end }} -{{- end }} -{{- $jfrFlags := printf "-Xms64M -XX:StartFlightRecording=disk=true,name=jfrRecording,maxage=%s,dumponexit=true,filename=%s/POD_NAME/jfr_dumponexit.jfr,settings=%s -XX:FlightRecorderOptions=maxchunksize=%s,memorysize=%s,repository=%s/POD_NAME --add-reads jdk.jfr=ALL-UNNAMED -Dotel.instrumentation.redisson.enabled=false" $maxage $jfrDumpRootLocation $jfcFilePath $maxchunksize $memorysize $jfrDumpRootLocation}} +{{- $jfrFlags := printf "-Xms64M -XX:StartFlightRecording=disk=true,name=jfrRecording,maxage=12h,dumponexit=true,filename=%s/POD_NAME/jfr_dumponexit.jfr,settings=/opt/harness/profile.jfc -XX:FlightRecorderOptions=maxchunksize=20M,memorysize=20M,repository=%s/POD_NAME --add-reads jdk.jfr=ALL-UNNAMED -Dotel.instrumentation.redisson.enabled=false" $jfrDumpRootLocation $jfrDumpRootLocation}} {{- if $.Values.global.jfr.enabled }} {{- $javaAdvancedFlags = printf "%s %s" $javaAdvancedFlags $jfrFlags }} {{- end }}