Skip to content

Commit

Permalink
Fix new cluster creation (#233)
Browse files Browse the repository at this point in the history
* Use --release-channel=stable by default instead of a specific version.
  • Loading branch information
plumpy authored Nov 15, 2021
1 parent f34e372 commit 26455a6
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
10 changes: 9 additions & 1 deletion scripts/install/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -210,11 +210,19 @@ fi
if [ -z "$CLUSTER_EXISTS" ]; then
bold "Creating GKE cluster $GKE_CLUSTER..."

# $GKE_RELEASE_CHANNEL is new as of 2021-08-13, so fall back to
# $GKE_CLUSTER_VERSION if it doesn't exist.
if [ -z "$GKE_RELEASE_CHANNEL" ]; then
CLUSTER_VERSION_SPEC="--cluster-version $GKE_CLUSTER_VERSION"
else
CLUSTER_VERSION_SPEC="--release-channel $GKE_RELEASE_CHANNEL"
fi

# TODO: Move some of these config settings to properties file.
# TODO: Should this be regional instead?
eval gcloud beta container clusters create $GKE_CLUSTER --project $PROJECT_ID \
--zone $ZONE --network $NETWORK_REFERENCE --subnetwork $SUBNET_REFERENCE \
--cluster-version $GKE_CLUSTER_VERSION --machine-type $GKE_MACHINE_TYPE \
$CLUSTER_VERSION_SPEC --machine-type $GKE_MACHINE_TYPE \
--disk-type $GKE_DISK_TYPE --disk-size $GKE_DISK_SIZE --service-account $SA_EMAIL \
--num-nodes $GKE_NUM_NODES --enable-stackdriver-kubernetes --enable-autoupgrade \
--enable-autorepair --enable-ip-alias --addons HorizontalPodAutoscaling,HttpLoadBalancing \
Expand Down
2 changes: 1 addition & 1 deletion scripts/install/setup_properties.sh
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ cat >> ~/cloudshell_open/spinnaker-for-gcp/scripts/install/properties <<EOL
export GKE_CLUSTER=${GKE_CLUSTER:-\$DEPLOYMENT_NAME}
# These are only considered if a new GKE cluster is being created.
export GKE_CLUSTER_VERSION=1.18.20
export GKE_RELEASE_CHANNEL=stable
export GKE_MACHINE_TYPE=n1-highmem-4
export GKE_DISK_TYPE=pd-standard
export GKE_DISK_SIZE=100
Expand Down

0 comments on commit 26455a6

Please sign in to comment.