From 4a4176db4213dc0dcebcb49effcdff85e1d37d78 Mon Sep 17 00:00:00 2001 From: saad-ali Date: Wed, 7 Nov 2018 19:46:54 -0800 Subject: [PATCH] Fix CSI CRD installation for Alpha clusters --- cluster/gce/config-default.sh | 16 ++++------------ cluster/gce/gci/configure-helper.sh | 2 +- 2 files changed, 5 insertions(+), 13 deletions(-) diff --git a/cluster/gce/config-default.sh b/cluster/gce/config-default.sh index 20d4d722bc3..671c1a5db7b 100755 --- a/cluster/gce/config-default.sh +++ b/cluster/gce/config-default.sh @@ -246,6 +246,10 @@ fi # Optional: customize runtime config RUNTIME_CONFIG="${KUBE_RUNTIME_CONFIG:-}" +if [[ "${KUBE_FEATURE_GATES:-}" == "AllAlpha=true" ]]; then + RUNTIME_CONFIG="${KUBE_RUNTIME_CONFIG:-api/all=true}" +fi + # Optional: set feature gates FEATURE_GATES="${KUBE_FEATURE_GATES:-ExperimentalCriticalPodAnnotation=true}" @@ -256,18 +260,6 @@ if [[ ! -z "${NODE_ACCELERATORS}" ]]; then fi fi -if [[ "${KUBE_FEATURE_GATES:-}" == "AllAlpha=true" ]]; then - RUNTIME_CONFIG="${KUBE_RUNTIME_CONFIG:-api/all=true}" - if ! [[ "${KUBE_FEATURE_GATES:-}" =~ "CSIDriverRegistry" ]]; then - # If not explicitly specified, default to true. - FEATURE_GATES="${FEATURE_GATES},CSIDriverRegistry=true" - fi - if ! [[ "${KUBE_FEATURE_GATES:-}" =~ "CSINodeInfo" ]]; then - # If not explicitly specified, default to true. - FEATURE_GATES="${FEATURE_GATES},CSINodeInfo=true" - fi -fi - # Optional: Install cluster DNS. # Set CLUSTER_DNS_CORE_DNS to 'false' to install kube-dns instead of CoreDNS. CLUSTER_DNS_CORE_DNS="${CLUSTER_DNS_CORE_DNS:-true}" diff --git a/cluster/gce/gci/configure-helper.sh b/cluster/gce/gci/configure-helper.sh index 291a72aa6b3..f57f0ba6b6a 100644 --- a/cluster/gce/gci/configure-helper.sh +++ b/cluster/gce/gci/configure-helper.sh @@ -2574,7 +2574,7 @@ EOF if [[ "${ENABLE_DEFAULT_STORAGE_CLASS:-}" == "true" ]]; then setup-addon-manifests "addons" "storage-class/gce" fi - if [[ "${FEATURE_GATES:-}" =~ "CSIDriverRegistry=true" || "${FEATURE_GATES:-}" =~ "CSINodeInfo=true" ]]; then + if [[ "${FEATURE_GATES:-}" =~ "AllAlpha=true" || "${FEATURE_GATES:-}" =~ "CSIDriverRegistry=true" || "${FEATURE_GATES:-}" =~ "CSINodeInfo=true" ]]; then setup-addon-manifests "addons" "storage-crds" fi if [[ "${ENABLE_IP_MASQ_AGENT:-}" == "true" ]]; then