Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions src/mas/devops/tekton.py
Original file line number Diff line number Diff line change
Expand Up @@ -1117,6 +1117,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)
Expand All @@ -1134,6 +1137,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(
Expand All @@ -1146,6 +1150,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)
Expand Down
15 changes: 15 additions & 0 deletions src/mas/devops/templates/pipelinerun-uninstall.yml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +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 }}"
{%- if cpd_operators_namespace is defined and cpd_operators_namespace != "" %}
- name: 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 }}"
{%- endif %}
{%- endif %}

Loading