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
58 - name: fleet-repo-volume
59 mountPath: '{{inputs.parameters.fleet_mount_path}}'
60 command: ["/app/scripts/entrypoint.sh"]
63 - "{{inputs.parameters.profile_name}}"
64 - "{{inputs.parameters.profile_type}}"
65 - "{{inputs.parameters.project_name}}"
66 - "{{inputs.parameters.fleet_repo_url}}"
67 - "{{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
101 - name: fleet-repo-volume
102 mountPath: '{{inputs.parameters.fleet_mount_path}}'
103 command: ["/app/scripts/entrypoint.sh"]
106 - "{{inputs.parameters.profile_name}}"
107 - "{{inputs.parameters.profile_type}}"
108 - "{{inputs.parameters.project_name}}"
109 - "{{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
143 - name: fleet-repo-volume
144 mountPath: '{{inputs.parameters.fleet_mount_path}}'
145 command: ["/app/scripts/entrypoint.sh"]
147 - attach_profile_to_cluster
148 - "{{inputs.parameters.profile_name}}"
149 - "{{inputs.parameters.profile_type}}"
150 - "{{inputs.parameters.project_name}}"
151 - "{{inputs.parameters.cluster_kustomization_name}}"
152 - "{{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
186 - name: fleet-repo-volume
187 mountPath: '{{inputs.parameters.fleet_mount_path}}'
188 command: ["/app/scripts/entrypoint.sh"]
190 - detach_profile_from_cluster
191 - "{{inputs.parameters.profile_name}}"
192 - "{{inputs.parameters.profile_type}}"
193 - "{{inputs.parameters.project_name}}"
194 - "{{inputs.parameters.cluster_kustomization_name}}"
195 - "{{inputs.parameters.fleet_repo_dir}}"