summaryrefslogtreecommitdiff
path: root/qa
diff options
context:
space:
mode:
authorDan Davison <ddavison@gitlab.com>2019-07-31 02:08:36 +0000
committerThong Kuah <tkuah@gitlab.com>2019-07-31 02:08:36 +0000
commit8a00c6b8778f0b50ede6bdcdbc8c3446f48efe4a (patch)
tree3eedff26ed851c7fa4049b4483fc6e88502da5f6 /qa
parented85fcfa6c79d82f373e31da911b307fa8b27f76 (diff)
downloadgitlab-ce-8a00c6b8778f0b50ede6bdcdbc8c3446f48efe4a.tar.gz
Add support for controlling amount of nodes
Nodes spun up in Gcloud defaults to '3' nodes This number can be a lot considering the QA autodevops spec does not need this many nodes
Diffstat (limited to 'qa')
-rw-r--r--qa/qa/runtime/env.rb4
-rw-r--r--qa/qa/service/kubernetes_cluster.rb1
2 files changed, 5 insertions, 0 deletions
diff --git a/qa/qa/runtime/env.rb b/qa/qa/runtime/env.rb
index e78b9bece19..4e5610d69b7 100644
--- a/qa/qa/runtime/env.rb
+++ b/qa/qa/runtime/env.rb
@@ -181,6 +181,10 @@ module QA
ENV.fetch('GCLOUD_REGION')
end
+ def gcloud_num_nodes
+ ENV.fetch('GCLOUD_NUM_NODES', 3)
+ end
+
def has_gcloud_credentials?
%w[GCLOUD_ACCOUNT_KEY GCLOUD_ACCOUNT_EMAIL].none? { |var| ENV[var].to_s.empty? }
end
diff --git a/qa/qa/service/kubernetes_cluster.rb b/qa/qa/service/kubernetes_cluster.rb
index 7b3451ed799..ac0b6313167 100644
--- a/qa/qa/service/kubernetes_cluster.rb
+++ b/qa/qa/service/kubernetes_cluster.rb
@@ -30,6 +30,7 @@ module QA
--enable-basic-auth
--region #{Runtime::Env.gcloud_region}
--disk-size 10GB
+ --num-nodes #{Runtime::Env.gcloud_num_nodes}
&& gcloud container clusters
get-credentials
--region #{Runtime::Env.gcloud_region}