From 7253b1b933ece786e6ddd2cc318ceeeb67d748bd Mon Sep 17 00:00:00 2001 From: pega-Abhinav <110885740+pega-Abhinav@users.noreply.github.com> Date: Tue, 30 Apr 2024 20:04:18 +0530 Subject: [PATCH] US-600953 : heapDumpPath parameter , POD_NAME in env for pega deployments (#736) * US-600953 : expose new parameter for heapDumpPath , POD_NAME env var to pega deployments * fix go tests --- charts/pega/templates/_pega-deployment.tpl | 5 +++++ charts/pega/templates/pega-environment-config.yaml | 4 ++++ terratest/src/test/pega/pega-tier-deployment_test.go | 2 ++ 3 files changed, 11 insertions(+) diff --git a/charts/pega/templates/_pega-deployment.tpl b/charts/pega/templates/_pega-deployment.tpl index dafdb4973..8434744f3 100644 --- a/charts/pega/templates/_pega-deployment.tpl +++ b/charts/pega/templates/_pega-deployment.tpl @@ -169,6 +169,11 @@ spec: value: {{ .nodeType }} - name: PEGA_APP_CONTEXT_PATH value: {{ template "pega.applicationContextPath" . }} + - name: POD_NAME + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: metadata.name {{- if .node.requestor }} - name: REQUESTOR_PASSIVATION_TIMEOUT value: "{{ .node.requestor.passivationTimeSec }}" diff --git a/charts/pega/templates/pega-environment-config.yaml b/charts/pega/templates/pega-environment-config.yaml index 04e2e9482..40b3aaa47 100644 --- a/charts/pega/templates/pega-environment-config.yaml +++ b/charts/pega/templates/pega-environment-config.yaml @@ -62,6 +62,10 @@ data: # CustomerData schema of the Pega installation CUSTOMERDATA_SCHEMA: {{ .Values.global.jdbc.customerDataSchema }} {{- end }} +{{- if .Values.global.heapDumpPath }} + # Custom value for HeapDumpPath + HEAP_DUMP_PATH: {{ .Values.global.heapDumpPath }} +{{- end }} {{- if and (.Values.pegasearch.externalSearchService) (not (.Values.pegasearch.srsAuth).enabled) }} # Search deployment type so that the engine knows to connect to the search service PEGA_SEARCH_TYPE: "ExternalSearchService" diff --git a/terratest/src/test/pega/pega-tier-deployment_test.go b/terratest/src/test/pega/pega-tier-deployment_test.go index 38b5eebc4..de280bade 100644 --- a/terratest/src/test/pega/pega-tier-deployment_test.go +++ b/terratest/src/test/pega/pega-tier-deployment_test.go @@ -180,6 +180,8 @@ func VerifyDeployment(t *testing.T, pod *k8score.PodSpec, expectedSpec pegaDeplo envIndex++ require.Equal(t, "PEGA_APP_CONTEXT_PATH", pod.Containers[0].Env[envIndex].Name) require.Equal(t, "prweb", pod.Containers[0].Env[envIndex].Value) + envIndex++ + require.Equal(t, "POD_NAME", pod.Containers[0].Env[envIndex].Name) if expectedSpec.name == getObjName(options, "-web") || expectedSpec.name == getObjName(options, "-stream") { envIndex++ require.Equal(t, "REQUESTOR_PASSIVATION_TIMEOUT", pod.Containers[0].Env[envIndex].Name)