1 #######################################################################################
2 # Copyright ETSI Contributors and Others.
4 # Licensed under the Apache License, Version 2.0 (the "License");
5 # you may not use this file except in compliance with the License.
6 # You may obtain a copy of the License at
8 # http://www.apache.org/licenses/LICENSE-2.0
10 # Unless required by applicable law or agreed to in writing, software
11 # distributed under the License is distributed on an "AS IS" BASIS,
12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
14 # See the License for the specific language governing permissions and
15 # limitations under the License.
16 #######################################################################################
18 apiVersion: argoproj.io/v1alpha1
19 kind: WorkflowTemplate
21 name: profile-management-wft
22 namespace: osm-workflows
27 - name: create-profile
30 # Volumes with cloned repos
31 - name: fleet_volume_name
32 - name: fleet_mount_path
40 - name: fleet_repo_url
42 # Other parameters - Recommended to keep defaults
43 - name: fleet_repo_dir
44 value: "/fleet/fleet-osm/"
47 - name: fleet-repo-volume
48 persistentVolumeClaim:
49 claimName: '{{inputs.parameters.fleet_volume_name}}'
51 image: ttl.sh/osm-krm-functions:24h
52 # imagePullPolicy: Always
54 - name: fleet-repo-volume
55 mountPath: '{{inputs.parameters.fleet_mount_path}}'
56 command: ["/app/scripts/entrypoint.sh"]
59 - "{{inputs.parameters.profile_name}}"
60 - "{{inputs.parameters.profile_type}}"
61 - "{{inputs.parameters.project_name}}"
62 - "{{inputs.parameters.fleet_repo_url}}"
63 - "{{inputs.parameters.fleet_repo_dir}}"
71 - name: delete-profile
74 # Volumes with cloned repos
75 - name: fleet_volume_name
76 - name: fleet_mount_path
85 # Other parameters - Recommended to keep defaults
86 - name: fleet_repo_dir
87 value: "/fleet/fleet-osm/"
90 - name: fleet-repo-volume
91 persistentVolumeClaim:
92 claimName: '{{inputs.parameters.fleet_volume_name}}'
94 image: ttl.sh/osm-krm-functions:24h
95 # imagePullPolicy: Always
97 - name: fleet-repo-volume
98 mountPath: '{{inputs.parameters.fleet_mount_path}}'
99 command: ["/app/scripts/entrypoint.sh"]
102 - "{{inputs.parameters.profile_name}}"
103 - "{{inputs.parameters.profile_type}}"
104 - "{{inputs.parameters.project_name}}"
105 - "{{inputs.parameters.fleet_repo_dir}}"
112 # Attach a profile to a cluster
113 - name: attach-profile-to-cluster
116 # Volumes with cloned repos
117 - name: fleet_volume_name
118 - name: fleet_mount_path
121 # Specific parameters
126 - name: cluster_kustomization_name
128 # Other parameters - Recommended to keep defaults
129 - name: fleet_repo_dir
130 value: "/fleet/fleet-osm/"
132 - name: fleet-repo-volume
133 persistentVolumeClaim:
134 claimName: '{{inputs.parameters.fleet_volume_name}}'
136 image: ttl.sh/osm-krm-functions:24h
137 # imagePullPolicy: Always
139 - name: fleet-repo-volume
140 mountPath: '{{inputs.parameters.fleet_mount_path}}'
141 command: ["/app/scripts/entrypoint.sh"]
143 - attach_profile_to_cluster
144 - "{{inputs.parameters.profile_name}}"
145 - "{{inputs.parameters.profile_type}}"
146 - "{{inputs.parameters.project_name}}"
147 - "{{inputs.parameters.cluster_kustomization_name}}"
148 - "{{inputs.parameters.fleet_repo_dir}}"
155 # Detach profile from cluster
156 - name: detach-profile-from-cluster
159 # Volumes with cloned repos
160 - name: fleet_volume_name
161 - name: fleet_mount_path
164 # Specific parameters
169 - name: cluster_kustomization_name
171 # Other parameters - Recommended to keep defaults
172 - name: fleet_repo_dir
173 value: "/fleet/fleet-osm/"
175 - name: fleet-repo-volume
176 persistentVolumeClaim:
177 claimName: '{{inputs.parameters.fleet_volume_name}}'
179 image: ttl.sh/osm-krm-functions:24h
180 # imagePullPolicy: Always
182 - name: fleet-repo-volume
183 mountPath: '{{inputs.parameters.fleet_mount_path}}'
184 command: ["/app/scripts/entrypoint.sh"]
186 - detach_profile_from_cluster
187 - "{{inputs.parameters.profile_name}}"
188 - "{{inputs.parameters.profile_type}}"
189 - "{{inputs.parameters.project_name}}"
190 - "{{inputs.parameters.cluster_kustomization_name}}"
191 - "{{inputs.parameters.fleet_repo_dir}}"