Skip to content

Commit

Permalink
Addon Manager: Fix parsing KUBECTL_EXTRA_PRUNE_WHITELIST
Browse files Browse the repository at this point in the history
When there are two or more values in KUBECTL_EXTRA_PRUNE_WHITELIST
kube-addons.sh wrongly generates "--prune-whitelist value1 value2"
Which kubectl parses as additional unknown flag[s]

Change-Id: I7661bda41ab7435e0e65eb0a662d1b16d2c14991
  • Loading branch information
jkaniuk committed Nov 18, 2019
1 parent 8548a25 commit 936ee6f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cluster/addons/addon-manager/kube-addons.sh
Expand Up @@ -120,7 +120,7 @@ function generate_prune_whitelist_flags() {
# besides the default ones.
extra_prune_whitelist=
if [ -n "${KUBECTL_EXTRA_PRUNE_WHITELIST:-}" ]; then
extra_prune_whitelist=( "${KUBECTL_EXTRA_PRUNE_WHITELIST:-}" )
read -ra extra_prune_whitelist <<< "${KUBECTL_EXTRA_PRUNE_WHITELIST}"
fi
prune_whitelist=( "${KUBECTL_PRUNE_WHITELIST[@]}" "${extra_prune_whitelist[@]}" )
prune_whitelist_flags=$(generate_prune_whitelist_flags "${prune_whitelist[@]}")
Expand Down

0 comments on commit 936ee6f

Please sign in to comment.