Commit dda5e49c authored by Łukasz Osipiuk's avatar Łukasz Osipiuk

Split CA parameters on manifest template expansion

Split arguments to be passed to cluster autoscaler binary, so each argument is passed separately. This is preparatory work for migrating CA to disroless base image and passing multiple arguments together does not work if CA is not wrapped around with shell script Change-Id: I26b5a764d2a12079c7f4ed6633ccabf8d623e232
parent f780ac02
......@@ -2164,7 +2164,13 @@ function start-cluster-autoscaler {
local params="${AUTOSCALER_MIG_CONFIG} ${CLOUD_CONFIG_OPT} ${AUTOSCALER_EXPANDER_CONFIG:---expander=price}"
params+=" --kubeconfig=/etc/srv/kubernetes/cluster-autoscaler/kubeconfig"
sed -i -e "s@{{params}}@${params}@g" "${src_file}"
# split the params into separate arguments passed to binary
local params_split
params_split=$(eval "for param in $params; do echo -n \\\"\$param\\\",; done")
params_split=${params_split%?}
sed -i -e "s@{{params}}@${params_split}@g" "${src_file}"
sed -i -e "s@{{cloud_config_mount}}@${CLOUD_CONFIG_MOUNT}@g" "${src_file}"
sed -i -e "s@{{cloud_config_volume}}@${CLOUD_CONFIG_VOLUME}@g" "${src_file}"
sed -i -e "s@{%.*%}@@g" "${src_file}"
......
......@@ -34,7 +34,7 @@
"--write-status-configmap=true",
"--balance-similar-node-groups=true",
"--expendable-pods-priority-cutoff=-10",
"{{params}}"
{{params}}
],
"env": [
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment