@@ -38,7 +38,7 @@ if [[ -n "$1" ]] && [[ $1 != -* ]] && [[ $1 != --* ]];then
38
38
CLOUDS_PATH=" $1 "
39
39
else
40
40
echo " Error: No clouds.yaml provided"
41
- echo " You must provide a valid clouds.yaml script to genereate a cloud.conf "
41
+ echo " You must provide a valid clouds.yaml"
42
42
echo " "
43
43
print_help
44
44
exit 1
@@ -70,21 +70,6 @@ if test -z "$PROVIDER_OS"; then
70
70
exit 1
71
71
fi
72
72
73
- if ! hash yq 2> /dev/null; then
74
- echo " 'yq' is not available, please install it. (https://github.com/mikefarah/yq)"
75
- echo " "
76
- print_help
77
- exit 1
78
- fi
79
-
80
- yq_type=$( file $( which yq) )
81
- if [[ $yq_type == * " Python script" * ]]; then
82
- echo " Wrong version of 'yq' installed, please install the one from https://github.com/mikefarah/yq"
83
- echo " "
84
- print_help
85
- exit 1
86
- fi
87
-
88
73
if [ -e out/provider-components.yaml ] && [ " $OVERWRITE " != " 1" ]; then
89
74
echo " Can't overwrite provider-components.yaml without user permission. Either run the script again"
90
75
echo " with -f or --force-overwrite, or delete the file in the out/ directory."
96
81
97
82
# Define global variables
98
83
PWD=$( cd ` dirname $0 ` ; pwd)
99
- TEMPLATES_PATH=${TEMPLATES_PATH:- $PWD / $SUPPORTED_PROVIDER_OS }
100
84
CONFIG_DIR=$PWD /provider-component/clouds-secrets/configs
101
85
OVERWRITE=${OVERWRITE:- 0}
102
86
CLOUDS_PATH=${CLOUDS_PATH:- " " }
@@ -113,17 +97,18 @@ if [ ! -f ${CLOUD_SSH_HOME}${CLOUD_SSH_PRIVATE_FILE} ]; then
113
97
ssh-keygen -t rsa -f ${CLOUD_SSH_HOME}${CLOUD_SSH_PRIVATE_FILE} -N " "
114
98
fi
115
99
116
- # Set up the output dir if it does not yet exist
117
- mkdir -p $PWD /out
118
- cp -n $PWD /cluster.yaml.template $PWD /out/cluster.yaml
119
- cp -n $PWD /machines.yaml.template $PWD /out/machines.yaml
120
-
100
+ # Prepare dependecies for kustomize
121
101
mkdir -p $CONFIG_DIR
122
102
cat $PWD /$CLOUDS_PATH > $CONFIG_DIR /clouds.yaml
123
103
124
104
cat " $MASTER_USER_DATA " > $USERDATA /$PROVIDER_OS /master-user-data.sh
125
105
cat " $WORKER_USER_DATA " > $USERDATA /$PROVIDER_OS /worker-user-data.sh
126
106
107
+ # Set up the output dir if it does not yet exist
108
+ mkdir -p $PWD /out
109
+ cp -n $PWD /cluster.yaml.template $PWD /out/cluster.yaml
110
+ cp -n $PWD /machines.yaml.template $PWD /out/machines.yaml
111
+
127
112
# Build provider-components.yaml with kustomize
128
113
kustomize build ../../../../config -o out/provider-components.yaml
129
114
0 commit comments