Skip to content

Commit

Permalink
Don't create the manifest for kube-addon-manager if it is configured …
Browse files Browse the repository at this point in the history
…to run via CRP.

Change-Id: I56279b5c1c0645b6798d5db4c0f736977915a3c6
  • Loading branch information
vinayakankugoyal authored and kl52752 committed Dec 23, 2022
1 parent 4bcc443 commit 59ad0af
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions gke/cluster/gce/gci/configure-helper.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2709,11 +2709,6 @@ function start-kube-addons {
local -r src_dir="${KUBE_HOME}/kube-manifests/kubernetes/gci-trusty"
local -r dst_dir="/etc/kubernetes/addons"

create-kubeconfig "addon-manager" "${ADDON_MANAGER_TOKEN}"
# User and group should never contain characters that need to be quoted
# shellcheck disable=SC2086
prepare-log-file /var/log/kube-addon-manager.log ${KUBE_ADDON_MANAGER_RUNASUSER:-2002}

# prep addition kube-up specific rbac objects
setup-addon-manifests "addons" "rbac/kubelet-api-auth"
setup-addon-manifests "addons" "rbac/kubelet-cert-rotation"
Expand Down Expand Up @@ -2889,6 +2884,14 @@ EOF
copy-manifests "${src_dir}/gce-extras/in-place" "${dst_dir}/gce-extras/in-place"
fi

if [[ "${KUBE_ADDON_MANAGER_CRP:-false}" == "true" ]]; then
echo "kube-addon-manager is configured to not be deployed through kube-up."
return
fi
create-kubeconfig "addon-manager" "${ADDON_MANAGER_TOKEN}"
# User and group should never contain characters that need to be quoted
# shellcheck disable=SC2086
prepare-log-file /var/log/kube-addon-manager.log ${KUBE_ADDON_MANAGER_RUNASUSER:-2002}

# Place addon manager pod manifest.
src_file="${src_dir}/kube-addon-manager.yaml"
Expand Down

0 comments on commit 59ad0af

Please sign in to comment.