fix(helm): support user defined namespace with nuvlaNamespaceOverride value#450
Merged
fix(helm): support user defined namespace with nuvlaNamespaceOverride value#450
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR adds support for user-defined namespaces in Helm deployments by allowing a nuvlaNamespaceOverride key in chart values to replace the default namespace and ensuring the override flows through action parameters and connector calls.
- Extend
_get_action_params_helmto include full module content for Helm actions. - Introduce
_override_namespacein the Kubernetes connector to apply a namespace override from chart values. - Propagate the overridden namespace through Helm operations and update
get_objectsin the k8s driver to accept an explicit namespace.
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| nuvla/job_engine/job/actions/deployment_stop.py | Include module_content in Helm-specific action parameters |
| nuvla/job_engine/job/actions/deployment_state.py | Pass deployment.data into get_services when using Helm connector |
| nuvla/job_engine/connector/kubernetes.py | Add yaml import, implement NAMESPACE_OVERRIDE_KEY and override logic |
| nuvla/job_engine/connector/k8s_driver.py | Update get_objects signature to accept namespace and fallback |
| nuvla/job_engine/connector/helm_driver.py | Remove unused from_base64 import |
Comments suppressed due to low confidence (5)
nuvla/job_engine/connector/k8s_driver.py:722
- The docstring for
get_objectsshould be updated to include the newnamespaceparameter and explain its behavior, ensuring API consumers are aware of the change.
def get_objects(self, deployment_uuid, object_kinds: List[str], namespace=None) -> List[dict]:
nuvla/job_engine/connector/kubernetes.py:162
- [nitpick] Consider adding unit tests for the
_override_namespacemethod, covering cases where the YAML contains a namespace override, invalid YAML, and no override, to ensure correct behavior.
def _override_namespace(self, namespace: str, values_yaml: str) -> str:
nuvla/job_engine/job/actions/deployment_stop.py:49
- [nitpick] Add tests for
_get_action_params_helmto verify thatmodule_contentis correctly included in the returned params for Helm deployments.
def _get_action_params_helm(self, deployment: dict) -> dict:
nuvla/job_engine/job/actions/deployment_state.py:35
- [nitpick] Include tests for
get_application_statewhenconnector_nameisCONNECTOR_KIND_HELM, ensuringkwargs['deployment']is correctly passed toget_services.
if connector_name == CONNECTOR_KIND_HELM:
nuvla/job_engine/job/actions/deployment_state.py:35
- The code uses
kwargs['deployment']butkwargsis not defined in this scope. Please ensurekwargsis initialized or passed into the method before usage.
if connector_name == CONNECTOR_KIND_HELM:
schaubl
approved these changes
Jul 15, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes https://github.com/SixSq/tasklist/issues/3534