mirror of https://github.com/k3s-io/k3s
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: I26b5a764d2a12079c7f4ed6633ccabf8d623e232k3s-v1.15.3
parent
f780ac028b
commit
dda5e49cac
|
@ -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": [
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue