1+ ---
2+ apiVersion: tekton.dev/v1beta1
3+ kind: PipelineRun
4+ metadata:
5+ name: "{{ mas_instance_id }}-backup-{{ restore_version }}"
6+ labels:
7+ tekton.dev/pipeline: mas-restore
8+ spec:
9+ pipelineRef:
10+ name: mas-restore
11+ serviceAccountName: "{{ service_account_name | default('pipeline', True) }}"
12+ workspaces:
13+ - name: shared-configs
14+ persistentVolumeClaim:
15+ claimName: config-pvc
16+ - name: shared-backups
17+ persistentVolumeClaim:
18+ claimName: backup-pvc
19+ params:
20+ # Common Parameters
21+ - name: image_pull_policy
22+ value: IfNotPresent
23+ - name: mas_instance_id
24+ value: "{{ mas_instance_id }}"
25+
26+ {% if skip_pre_check is defined and skip_pre_check != "" %}
27+ # Pipeline config
28+ - name: skip_pre_check
29+ value: "{{ skip_pre_check }}"
30+ {% endif %}
31+
32+ # Restore Configuration
33+ - name: restore_version
34+ value: "{{ restore_version }}"
35+
36+ # Component Flags
37+ {% if include_sls is defined and include_sls != "" %}
38+ - name: include_sls
39+ value: "{{ include_sls }}"
40+ {% endif %}
41+ {% if include_dro is defined and include_dro != "" %}
42+ - name: include_dro
43+ value: "{{ include_dro }}"
44+ {% endif %}
45+ {% if include_grafana is defined and include_grafana != "" %}
46+ - name: include_grafana
47+ value: "{{ include_grafana }}"
48+ {% endif %}
49+
50+ # MongoDB Configuration
51+ {% if mongodb_namespace is defined and mongodb_namespace != "" %}
52+ - name: mongodb_namespace
53+ value: "{{ mongodb_namespace }}"
54+ {% endif %}
55+ {% if mongodb_instance_name is defined and mongodb_instance_name != "" %}
56+ - name: mongodb_instance_name
57+ value: "{{ mongodb_instance_name }}"
58+ {% endif %}
59+ {% if mongodb_provider is defined and mongodb_provider != "" %}
60+ - name: mongodb_provider
61+ value: "{{ mongodb_provider }}"
62+ {% endif %}
63+
64+ # SLS Configuration
65+ {% if sls_namespace is defined and sls_namespace != "" %}
66+ - name: sls_namespace
67+ value: "{{ sls_namespace }}"
68+ {% endif %}
69+
70+ # DRO Configuration
71+ {% if dro_contact_email is defined and dro_contact_email != "" %}
72+ - name: dro_contact_email
73+ value: "{{ dro_contact_email }}"
74+ {% endif %}
75+ {% if dro_contact_firstname is defined and dro_contact_firstname != "" %}
76+ - name: dro_contact_firstname
77+ value: "{{ dro_contact_firstname }}"
78+ {% endif %}
79+ {% if dro_contact_lastname is defined and dro_contact_lastname != "" %}
80+ - name: dro_contact_lastname
81+ value: "{{ dro_contact_lastname }}"
82+ {% endif %}
83+ {% if ibm_entitlement_key is defined and ibm_entitlement_key != "" %}
84+ - name: ibm_entitlement_key
85+ value: "{{ ibm_entitlement_key }}"
86+ {% endif %}
87+ {% if dro_namespace is defined and dro_namespace != "" %}
88+ - name: dro_namespace
89+ value: "{{ dro_namespace }}"
90+ {% endif %}
91+ {% if dro_storage_class is defined and dro_storage_class != "" %}
92+ - name: dro_storage_class
93+ value: "{{ dro_storage_class }}"
94+ {% endif %}
95+
96+ # Suite Restore Configuration
97+ {% if sls_url_on_restore is defined and sls_url_on_restore != "" %}
98+ - name: sls_url_on_restore
99+ value: "{{ sls_url_on_restore }}"
100+ {% endif %}
101+ {% if sls_cfg_file is defined and sls_cfg_file != "" %}
102+ - name: sls_cfg_file
103+ value: "{{ sls_cfg_file }}"
104+ {% endif %}
105+ {% if dro_url_on_restore is defined and dro_url_on_restore != "" %}
106+ - name: dro_url_on_restore
107+ value: "{{ dro_url_on_restore }}"
108+ {% endif %}
109+ {% if dro_cfg_file is defined and dro_cfg_file != "" %}
110+ - name: dro_cfg_file
111+ value: "{{ dro_cfg_file }}"
112+ {% endif %}
113+ {% if mas_domain_on_restore is defined and mas_domain_on_restore != "" %}
114+ - name: mas_domain_on_restore
115+ value: "{{ mas_domain_on_restore }}"
116+ {% endif %}
117+
118+ # Certificate Manager Configuration
119+ {% if cert_manager_provider is defined and cert_manager_provider != "" %}
120+ - name: cert_manager_provider
121+ value: "{{ cert_manager_provider }}"
122+ {% endif %}
123+
124+ # Development Build Support
125+ {% if artifactory_username is defined and artifactory_username != "" %}
126+ - name: artifactory_username
127+ value: "{{ artifactory_username }}"
128+ {% endif %}
129+ {% if artifactory_token is defined and artifactory_token != "" %}
130+ - name: artifactory_token
131+ value: "{{ artifactory_token }}"
132+ {% endif %}
133+
134+ # Download Configuration
135+ {% if backup_archive_name is defined and backup_archive_name != "" %}
136+ - name: backup_archive_name
137+ value: "{{ backup_archive_name }}"
138+ {% endif %}
139+ {% if download_backup is defined and download_backup != "" %}
140+ - name: download_backup
141+ value: "{{ download_backup }}"
142+ {% endif %}
143+ {% if aws_access_key_id is defined and aws_access_key_id != "" %}
144+ - name: aws_access_key_id
145+ value: "{{ aws_access_key_id }}"
146+ {% endif %}
147+ {% if aws_secret_access_key is defined and aws_secret_access_key != "" %}
148+ - name: aws_secret_access_key
149+ value: "{{ aws_secret_access_key }}"
150+ {% endif %}
151+ {% if s 3_bucket_name is defined and s 3_bucket_name != "" %}
152+ - name: s3_bucket_name
153+ value: "{{ s3_bucket_name }}"
154+ {% endif %}
155+ {% if s 3_region is defined and s 3_region != "" %}
156+ - name: s3_region
157+ value: "{{ s3_region }}"
158+ {% endif %}
159+ {% if artifactory_url is defined and artifactory_url != "" %}
160+ - name: artifactory_url
161+ value: "{{ artifactory_url }}"
162+ {% endif %}
163+ {% if artifactory_repository is defined and artifactory_repository != "" %}
164+ - name: artifactory_repository
165+ value: "{{ artifactory_repository }}"
166+ {% endif %}
0 commit comments