@@ -974,8 +974,7 @@ Cron-specific asyncProfiler helpers
974974{ {- end -} }
975975
976976{ {/*
977- Merge extraEnvs from backend and crons with crons taking precedence for duplicate keys.
978- JAVA options are intentionally filtered out and should be added explicitly by templates.
977+ Merge extraEnvs from backend and crons with crons taking precedence for duplicate keys
979978*/} }
980979{ {- define " lightrun-crons.mergedExtraEnvs" -} }
981980{ {- $backendExtraEnvs := .Values.deployments.backend.extraEnvs | default list -} }
@@ -994,17 +993,13 @@ JAVA options are intentionally filtered out and should be added explicitly by te
994993{ {- end -} }
995994{ {/* Only add backend env if not overridden by crons */} }
996995{ {- if not $isOverridden -} }
997- { {- if and (ne $backendEnv .name " _JAVA_OPTIONS" ) (ne $backendEnv .name " JAVA_OPTIONS" ) -} }
998- { {- $mergedEnvs = append $mergedEnvs $backendEnv -} }
999- { {- end -} }
996+ { {- $mergedEnvs = append $mergedEnvs $backendEnv -} }
1000997{ {- end -} }
1001998{ {- end -} }
1002999
10031000{ {/* Then, add all crons extraEnvs (these take precedence) */} }
10041001{ {- range $cronsExtraEnvs -} }
1005- { {- if and (ne .name " _JAVA_OPTIONS" ) (ne .name " JAVA_OPTIONS" ) -} }
1006- { {- $mergedEnvs = append $mergedEnvs . -} }
1007- { {- end -} }
1002+ { {- $mergedEnvs = append $mergedEnvs . -} }
10081003{ {- end -} }
10091004
10101005{ {/* Output merged envs as YAML if any exist */} }
@@ -1013,20 +1008,6 @@ JAVA options are intentionally filtered out and should be added explicitly by te
10131008{ {- end -} }
10141009{ {- end -} }
10151010
1016-
1017- { {/* Get merged JAVA options from backend+crons with crons taking precedence */} }
1018- { {- define " lightrun-crons.getMergedJavaOptions" -} }
1019- { {- $backendExtraEnvs := .Values.deployments.backend.extraEnvs | default list -} }
1020- { {- $cronsExtraEnvs := .Values.deployments.crons.extraEnvs | default list -} }
1021- { {- $opts := include " get-java-options-from-envs" $backendExtraEnvs -} }
1022- { {- $cronsOpts := include " get-java-options-from-envs" $cronsExtraEnvs -} }
1023- { {- if $cronsOpts -} }
1024- { {- $cronsOpts -} }
1025- { {- else -} }
1026- { {- $opts -} }
1027- { {- end -} }
1028- { {- end -} }
1029-
10301011{ {/*
10311012################
10321013### Datadog ###
0 commit comments