feat(deployment-operator): implement monty-based python interpreter for values templating - #4054
Conversation
- Add support for Python script resources (`PythonScript`, `PythonFile`, `PythonFolder`) in Helm value generation. - Extend Helm render logic to merge Python and Lua values. - Implement Python tests for template values. - Introduce Python runtime utils and Gomonty integration. - Update Dockerfile to include necessary environment variables and dependencies for Python execution. - Add comprehensive unit tests for manager wait and Python templating functionalities.
…-implement-python-equivalent-in-deployment-operator
Soffi AI SummaryThis PR introduces a Python-based values templating engine for Helm deployments in the deployment operator, as an alternative to the existing Lua scripting support. The motivation is to give operators a more familiar and expressive scripting language (Python via a "monty" interpreter pool) for generating Helm values dynamically — matching capabilities already available through Lua scripts. The implementation adds a managed Python runtime pool ( ChangesPython values templating for Helm deployments
Updated: 2026-08-26 15:36 UTC |
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
Greptile SummaryAdds Monty-based Python execution for Helm values templating in the deployment operator.
Confidence Score: 5/5The PR appears safe to merge; no concrete blocking or independently actionable non-blocking issue was identified. The Python runtime is bounded and lifecycle-managed, filesystem inputs are confined to the fetched source root, generated values preserve explicit precedence, and the dependency security leads either predate this change or lack a reachable changed-code path.
|
| Filename | Overview |
|---|---|
| go/deployment-operator/pkg/python/pool.go | Implements a bounded, cancellable pool of isolated Monty REPLs with strict JSON input/output and resource limits; no actionable defect was identified. |
| go/deployment-operator/pkg/manifests/template/helm.go | Adds path-confined Python script loading and merges generated files and values in an explicitly tested Lua-then-Python order. |
| go/deployment-operator/cmd/agent/main.go | Initializes the Python pool after configuration loading and waits for reconcilers before deferred runtime cleanup. |
| go/deployment-operator/pkg/controller/controller_manager.go | Adds an idempotent shutdown-completion signal used to coordinate runtime cleanup with controller termination. |
| go/deployment-operator/Dockerfile | Enables the Monty musl build, installs its runtime library, and provides a writable FFI cache directory for the non-root operator user. |
| go/client/graph/deployment.graphql | Requests the three new Helm Python configuration fields through the agent-facing service deployment fragment. |
Reviews (1): Last reviewed commit: "Merge remote-tracking branch 'origin/mas..." | Re-trigger Greptile
- Replace manual append method with `slices.Concat` for combining `luaValuesFiles` and `pythonValuesFiles`.
…an/prod-5160-implement-python-equivalent-in-deployment-operator
- Introduce `helmRenderInputs` to generate Helm values files and configuration keys - Log Helm render input details including values files and their existence status
Test Plan
Test environment: https://console.plrl-dev-aws.onplural.sh/
Checklist
Plural Flow: console