| garciadeblas | 8d8cd99 | 2024-05-21 16:04:14 +0200 | [diff] [blame] | 1 | ####################################################################################### |
| 2 | # Copyright ETSI Contributors and Others. |
| 3 | # |
| 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 |
| 7 | # |
| 8 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | # |
| 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 |
| 13 | # implied. |
| 14 | # See the License for the specific language governing permissions and |
| 15 | # limitations under the License. |
| 16 | ####################################################################################### |
| 17 | |
| 18 | set -e -o pipefail |
| 19 | |
| 20 | export HERE=$(dirname "$(readlink --canonicalize "$BASH_SOURCE")") |
| 21 | source "${HERE}/library/functions.sh" |
| 22 | source "${HERE}/library/trap.sh" |
| 23 | |
| 24 | |
| 25 | # Input values |
| 26 | export PROJECT_DIR="$1" |
| 27 | export PROFILE_NAME="$2" |
| 28 | |
| 29 | # Reference folders |
| 30 | export ADDON_CTRL_DIR="${PROJECT_DIR}/infra-controller-profiles/${PROFILE_NAME}" |
| 31 | export ADDON_CONFIG_DIR="${PROJECT_DIR}/infra-config-profiles/${PROFILE_NAME}" |
| 32 | |
| 33 | # Add the CrossPlane controller |
| 34 | PACKAGE="${SW_CATALOGS_REPO_DIR}/infra-controllers/crossplane/controller" |
| 35 | cp "${PACKAGE}/templates"/* "${ADDON_CTRL_DIR}/" |
| 36 | |
| 37 | # Add the CrossPlane providers |
| 38 | ## Azure providers |
| 39 | PACKAGE="${SW_CATALOGS_REPO_DIR}/infra-controllers/crossplane/providers/azure" |
| 40 | cp "${PACKAGE}/templates"/* "${ADDON_CTRL_DIR}/" |
| 41 | |
| 42 | ## GCP providers |
| 43 | PACKAGE="${SW_CATALOGS_REPO_DIR}/infra-controllers/crossplane/providers/gcp" |
| 44 | cp "${PACKAGE}/templates"/* "${ADDON_CTRL_DIR}/" |
| 45 | |
| 46 | ## AWS providers |
| 47 | PACKAGE="${SW_CATALOGS_REPO_DIR}/infra-controllers/crossplane/providers/aws" |
| 48 | cp "${PACKAGE}/templates"/* "${ADDON_CTRL_DIR}/" |
| 49 | |
| 50 | # Add the Argo WorkFlows controller |
| 51 | PACKAGE="${SW_CATALOGS_REPO_DIR}/infra-controllers/argo-workflows" |
| 52 | cp "${PACKAGE}/templates"/* "${ADDON_CTRL_DIR}/" |
| garciadeblas | 5e54143 | 2025-06-11 11:13:45 +0200 | [diff] [blame] | 53 | |
| 54 | # Add the CAPI controller and providers |
| 55 | PACKAGE="${SW_CATALOGS_REPO_DIR}/infra-controllers/capi" |
| 56 | cp "${PACKAGE}/templates"/* "${ADDON_CTRL_DIR}/" |