Skip to content
This repository was archived by the owner on May 5, 2025. It is now read-only.

Commit 26455a6

Browse files
authored
Fix new cluster creation (#233)
* Use --release-channel=stable by default instead of a specific version.
1 parent f34e372 commit 26455a6

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

scripts/install/setup.sh

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,11 +210,19 @@ fi
210210
if [ -z "$CLUSTER_EXISTS" ]; then
211211
bold "Creating GKE cluster $GKE_CLUSTER..."
212212

213+
# $GKE_RELEASE_CHANNEL is new as of 2021-08-13, so fall back to
214+
# $GKE_CLUSTER_VERSION if it doesn't exist.
215+
if [ -z "$GKE_RELEASE_CHANNEL" ]; then
216+
CLUSTER_VERSION_SPEC="--cluster-version $GKE_CLUSTER_VERSION"
217+
else
218+
CLUSTER_VERSION_SPEC="--release-channel $GKE_RELEASE_CHANNEL"
219+
fi
220+
213221
# TODO: Move some of these config settings to properties file.
214222
# TODO: Should this be regional instead?
215223
eval gcloud beta container clusters create $GKE_CLUSTER --project $PROJECT_ID \
216224
--zone $ZONE --network $NETWORK_REFERENCE --subnetwork $SUBNET_REFERENCE \
217-
--cluster-version $GKE_CLUSTER_VERSION --machine-type $GKE_MACHINE_TYPE \
225+
$CLUSTER_VERSION_SPEC --machine-type $GKE_MACHINE_TYPE \
218226
--disk-type $GKE_DISK_TYPE --disk-size $GKE_DISK_SIZE --service-account $SA_EMAIL \
219227
--num-nodes $GKE_NUM_NODES --enable-stackdriver-kubernetes --enable-autoupgrade \
220228
--enable-autorepair --enable-ip-alias --addons HorizontalPodAutoscaling,HttpLoadBalancing \

scripts/install/setup_properties.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ cat >> ~/cloudshell_open/spinnaker-for-gcp/scripts/install/properties <<EOL
152152
export GKE_CLUSTER=${GKE_CLUSTER:-\$DEPLOYMENT_NAME}
153153
154154
# These are only considered if a new GKE cluster is being created.
155-
export GKE_CLUSTER_VERSION=1.18.20
155+
export GKE_RELEASE_CHANNEL=stable
156156
export GKE_MACHINE_TYPE=n1-highmem-4
157157
export GKE_DISK_TYPE=pd-standard
158158
export GKE_DISK_SIZE=100

0 commit comments

Comments
 (0)