Commit a5c82ceb authored by João Alexandre Cunha's avatar João Alexandre Cunha Committed by Alex Kalderimis

Pin the GKE version to 1.18 for cluster creation

Basic authentication was removed for GKE cluster versions 1.19
Our API call to create GKE clusters did not specify a cluster version,
thus the integration started breaking as soon as Google defined that
1.19 is the default version.

The quickest solution is to pin the k8s version to 1.18.

Changelog: fixed
parent d52986a9
......@@ -13,6 +13,10 @@ module GoogleApi
LEAST_TOKEN_LIFE_TIME = 10.minutes
CLUSTER_MASTER_AUTH_USERNAME = 'admin'
CLUSTER_IPV4_CIDR_BLOCK = '/16'
# Don't upgrade to > 1.18 before we move away from Basic Auth
# See issue: https://gitlab.com/gitlab-org/gitlab/-/issues/331582
# Possible solution: https://gitlab.com/groups/gitlab-org/-/epics/6049
GKE_VERSION = '1.18'
CLUSTER_OAUTH_SCOPES = [
"https://www.googleapis.com/auth/devstorage.read_only",
"https://www.googleapis.com/auth/logging.write",
......@@ -90,6 +94,7 @@ module GoogleApi
cluster: {
name: cluster_name,
initial_node_count: cluster_size,
initial_cluster_version: GKE_VERSION,
node_config: {
machine_type: machine_type,
oauth_scopes: CLUSTER_OAUTH_SCOPES
......
......@@ -91,6 +91,7 @@ RSpec.describe GoogleApi::CloudPlatform::Client do
cluster: {
name: cluster_name,
initial_node_count: cluster_size,
initial_cluster_version: '1.18',
node_config: {
machine_type: machine_type,
oauth_scopes: [
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment