diff options
author | Shinya Maeda <shinya@gitlab.com> | 2017-10-01 17:48:21 +0900 |
---|---|---|
committer | Shinya Maeda <shinya@gitlab.com> | 2017-10-01 17:48:21 +0900 |
commit | 2d1a77b8a3567cae61f73196918fe365d4fe9415 (patch) | |
tree | 024e0d030771f876dc40bcf9c60c12ff41280ece /lib/google_api | |
parent | e499c1c39dbea505858874ee47436641df3d93d4 (diff) | |
download | gitlab-ce-2d1a77b8a3567cae61f73196918fe365d4fe9415.tar.gz |
Revert KubernetesService. Introduce FetchKubernetesTokenService.
Diffstat (limited to 'lib/google_api')
-rw-r--r-- | lib/google_api/cloud_platform/client.rb | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/google_api/cloud_platform/client.rb b/lib/google_api/cloud_platform/client.rb index 74ae5e16ab2..a1abc5bf074 100644 --- a/lib/google_api/cloud_platform/client.rb +++ b/lib/google_api/cloud_platform/client.rb @@ -3,6 +3,8 @@ require 'google/apis/container_v1' module GoogleApi module CloudPlatform class Client < GoogleApi::Auth + DEFAULT_MACHINE_TYPE = 'n1-standard-1' + class << self def session_key_for_token :cloud_platform_access_token @@ -27,8 +29,6 @@ module GoogleApi cluster end - # Responce exmaple - # TODO: machine_type : Defailt 3.75 GB def projects_zones_clusters_create(project_id, zone, cluster_name, cluster_size, machine_type:) service = Google::Apis::ContainerV1::ContainerService.new service.authorization = access_token @@ -37,7 +37,10 @@ module GoogleApi { "cluster": { "name": cluster_name, - "initial_node_count": cluster_size + "initial_node_count": cluster_size, + "node_config": { + "machine_type": machine_type # Default 3.75 GB, if ommit + } } } ) |