-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathcreate-deployment-config.sh
executable file
·36 lines (27 loc) · 1.41 KB
/
create-deployment-config.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#!/bin/bash
set -x
set -o errexit
# ToDo: Add possibility to specify version, because currently the version must be manually set in th econtrollers' YAML files.
OUTPUT="deployment/1-elasticity-strategies.yaml"
# Delete old config.
rm -rf "$OUTPUT"
# Build the projects.
INPUT_YAML_FILES=(
# CRDs
"ts/crds/kubernetes/costefficiencymetricmappings.metrics.polaris-slo-cloud.github.io.yaml"
"ts/crds/kubernetes/costefficiencyslomappings.slo.polaris-slo-cloud.github.io.yaml"
"ts/crds/kubernetes/cpuusageslomappings.slo.polaris-slo-cloud.github.io.yaml"
"ts/crds/kubernetes/horizontalelasticitystrategies.elasticity.polaris-slo-cloud.github.io.yaml"
"ts/crds/kubernetes/verticalelasticitystrategies.elasticity.polaris-slo-cloud.github.io.yaml"
# Horizontal Elasticity Strategy controller
"ts/apps/elasticity/horizontal-elasticity-strategy-controller/manifests/1-rbac.yaml"
"ts/apps/elasticity/horizontal-elasticity-strategy-controller/manifests/2-elasticity-strategy-controller.yaml"
# Vertical Elasticity Strategy controller
"ts/apps/elasticity/vertical-elasticity-strategy-controller/manifests/1-rbac.yaml"
"ts/apps/elasticity/vertical-elasticity-strategy-controller/manifests/2-elasticity-strategy-controller.yaml"
)
for inputPath in ${INPUT_YAML_FILES[@]}; do
cat "$inputPath" >> "$OUTPUT"
echo -e "\n---\n" >> "$OUTPUT"
done
echo "Successfully wrote deployment config to $OUTPUT"