diff options
author | Mayra Cabrera <mcabrera@gitlab.com> | 2019-04-01 19:29:05 +0300 |
---|---|---|
committer | Nick Thomas <nick@gitlab.com> | 2019-04-01 19:29:05 +0300 |
commit | b5e09a26de6afb0c194613c6ee4d22a22a0fce14 (patch) | |
tree | 01ed0f370aafb42567dae4cfbc07c8c9fb9a40f7 /lib/api | |
parent | d8258470b5c8cf5ec9f77cb1e0f8950a87b5c110 (diff) |
Include cluster domain into Project Cluster API
Domain was introduced on 11.8 and was not included on the
Project Cluster API. With this change user will be able to include
domain when adding and updating a cluster. Domain will also be included
on the GET calls.
Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/59441
Diffstat (limited to 'lib/api')
-rw-r--r-- | lib/api/entities.rb | 2 | ||||
-rw-r--r-- | lib/api/project_clusters.rb | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/lib/api/entities.rb b/lib/api/entities.rb index 0871ea8d21e..4533305bfd3 100644 --- a/lib/api/entities.rb +++ b/lib/api/entities.rb @@ -1588,7 +1588,7 @@ module API end class Cluster < Grape::Entity - expose :id, :name, :created_at + expose :id, :name, :created_at, :domain expose :provider_type, :platform_type, :environment_scope, :cluster_type expose :user, using: Entities::UserBasic expose :platform_kubernetes, using: Entities::Platform::Kubernetes diff --git a/lib/api/project_clusters.rb b/lib/api/project_clusters.rb index c96261a7b57..b62ec887183 100644 --- a/lib/api/project_clusters.rb +++ b/lib/api/project_clusters.rb @@ -53,6 +53,7 @@ module API params do requires :name, type: String, desc: 'Cluster name' optional :enabled, type: Boolean, default: true, desc: 'Determines if cluster is active or not, defaults to true' + optional :domain, type: String, desc: 'Cluster base domain' requires :platform_kubernetes_attributes, type: Hash, desc: %q(Platform Kubernetes data) do requires :api_url, type: String, allow_blank: false, desc: 'URL to access the Kubernetes API' requires :token, type: String, desc: 'Token to authenticate against Kubernetes' @@ -83,6 +84,7 @@ module API params do requires :cluster_id, type: Integer, desc: 'The cluster ID' optional :name, type: String, desc: 'Cluster name' + optional :domain, type: String, desc: 'Cluster base domain' optional :platform_kubernetes_attributes, type: Hash, desc: %q(Platform Kubernetes data) do optional :api_url, type: String, desc: 'URL to access the Kubernetes API' optional :token, type: String, desc: 'Token to authenticate against Kubernetes' |