snicholasbarton opened a new pull request, #778: URL: https://github.com/apache/spark-kubernetes-operator/pull/778
### What changes were proposed in this pull request? Each JVM option in `operatorDeployment.operatorPod.operatorContainer.jvmArgs` now renders as its own element of the operator container's `command`, instead of the whole string being passed through a single `"$(OPERATOR_JAVA_OPTS)"` element. The `with` guard drops empty strings, so leading, trailing, and repeated spaces produce no empty arguments. Also adds a helm-unittest suite covering the rendered `command`, runs it from the existing lint job, and anchors `/tests/` in `.helmignore` so the suite is not packaged into the released chart. ### Why are the changes needed? Kubernetes `$(VAR)` expansion substitutes into a single argv element and never splits on whitespace, so the entire `jvmArgs` string reaches the JVM as one argument. It begins with `-D`, so the JVM reads it as one system property and ignores every later option. Nothing errors or warns. None of the shipped defaults (`CrashOnOutOfMemoryError`, `ErrorFile`, `UseParallelGC`, `InitialRAMPercentage`, `MaxRAMPercentage`, `AlwaysPreTouch`, and `UseCompactObjectHeaders`) have any effect. E.g. the operator runs at the JVM default 25% `MaxRAMPercentage` instead of 80%. ### Does this PR introduce _any_ user-facing change? Yes, insofar as we fixed a bug: `jvmArgs` values now take effect as expected. ### How was this patch tested? Added new helm-unittest suite, to CI. Seven cases: default values, an explicit two-option string, a single option, an empty string, leading/trailing/repeated spaces, options containing YAML metacharacters, and the `OPERATOR_JAVA_OPTS` env var. Six of these fail against the unfixed template, showing that the fix took effect. Also manually re-ran the repro detailed in the JIRA ticket and confirmed the fix. ### Was this patch authored or co-authored using generative AI tooling? Generated-by: Claude Code (claude-opus-5) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
