From c8dd0baac073df4e532faee7849bb5ee964d0865 Mon Sep 17 00:00:00 2001 From: Prajesh Jain Date: Wed, 22 Jul 2026 11:44:49 +0530 Subject: [PATCH 1/2] [minor] add cp4d_uninstall role to uninstall pipeline --- src/mas/devops/tekton.py | 7 +++++++ src/mas/devops/templates/pipelinerun-uninstall.yml.j2 | 6 ++++++ 2 files changed, 13 insertions(+) diff --git a/src/mas/devops/tekton.py b/src/mas/devops/tekton.py index 4d81a14d..31b58cc0 100644 --- a/src/mas/devops/tekton.py +++ b/src/mas/devops/tekton.py @@ -1115,6 +1115,9 @@ def launchUninstallPipeline( uninstallDRO: bool = False, uninstallMongoDb: bool = False, uninstallSLS: bool = False, + uninstallCp4d: bool = False, + cpdOperatorsNamespace: str = "", + cpdInstanceNamespace: str = "", ) -> str: """ Create a PipelineRun to uninstall the chosen MAS instance (and selected dependencies) @@ -1132,6 +1135,7 @@ def launchUninstallPipeline( mongoDbAction = "uninstall" if uninstallMongoDb else "none" slsAction = "uninstall" if uninstallSLS else "none" droAction = "uninstall" if uninstallDRO else "none" + cp4dAction = "uninstall" if uninstallCp4d else "none" # Render the pipelineRun renderedTemplate = template.render( @@ -1144,6 +1148,9 @@ def launchUninstallPipeline( sls_action=slsAction, dro_action=droAction, dro_namespace=droNamespace, + cp4d_action=cp4dAction, + cpd_operators_namespace=cpdOperatorsNamespace, + cpd_instance_namespace=cpdInstanceNamespace, ) logger.debug(renderedTemplate) pipelineRun = yaml.safe_load(renderedTemplate) diff --git a/src/mas/devops/templates/pipelinerun-uninstall.yml.j2 b/src/mas/devops/templates/pipelinerun-uninstall.yml.j2 index 6fa3189f..f9ec9b83 100644 --- a/src/mas/devops/templates/pipelinerun-uninstall.yml.j2 +++ b/src/mas/devops/templates/pipelinerun-uninstall.yml.j2 @@ -39,4 +39,10 @@ spec: value: {{ dro_action }} - name: dro_namespace value: {{ dro_namespace }} + - name: cp4d_action + value: {{ cp4d_action }} + - name: cpd_operators_namespace + value: {{ cpd_operators_namespace }} + - name: cpd_instance_namespace + value: {{ cpd_instance_namespace }} From fd499e0478b88040c599a8231c91ffcfadbc2696 Mon Sep 17 00:00:00 2001 From: Prajesh Jain Date: Tue, 28 Jul 2026 18:44:48 +0530 Subject: [PATCH 2/2] [patch] added if condition for additional parameters --- .../devops/templates/pipelinerun-uninstall.yml.j2 | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/src/mas/devops/templates/pipelinerun-uninstall.yml.j2 b/src/mas/devops/templates/pipelinerun-uninstall.yml.j2 index f9ec9b83..8f2120ff 100644 --- a/src/mas/devops/templates/pipelinerun-uninstall.yml.j2 +++ b/src/mas/devops/templates/pipelinerun-uninstall.yml.j2 @@ -39,10 +39,19 @@ spec: value: {{ dro_action }} - name: dro_namespace value: {{ dro_namespace }} +{%- if cp4d_action is defined and cp4d_action != "none" %} + + # Dependencies - CP4D + # ------------------------------------------------------------------------- - name: cp4d_action - value: {{ cp4d_action }} + value: "{{ cp4d_action }}" +{%- if cpd_operators_namespace is defined and cpd_operators_namespace != "" %} - name: cpd_operators_namespace - value: {{ cpd_operators_namespace }} + value: "{{ cpd_operators_namespace }}" +{%- endif %} +{%- if cpd_instance_namespace is defined and cpd_instance_namespace != "" %} - name: cpd_instance_namespace - value: {{ cpd_instance_namespace }} + value: "{{ cpd_instance_namespace }}" +{%- endif %} +{%- endif %}