diff options
author | Stan Hu <stanhu@gmail.com> | 2019-05-03 01:05:54 +0000 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2019-05-03 01:05:54 +0000 |
commit | 56c76d2f955f9fd214dc8f6bf22d549696e773b4 (patch) | |
tree | b410a357818fff737a7de2f44fb715c1fb8aeb6e /lib | |
parent | 7be2796e24e86c421c8988f454c51755b7f3e153 (diff) | |
parent | 89132bbdd63bbd033c43422500a972af6d94a4d0 (diff) | |
download | gitlab-ce-56c76d2f955f9fd214dc8f6bf22d549696e773b4.tar.gz |
Merge branch '56557-disable-kubernetes-namespace-service-account-backend' into 'master'
Add gitlab-managed option to clusters form
Closes #56557
See merge request gitlab-org/gitlab-ce!26565
Diffstat (limited to 'lib')
-rw-r--r-- | lib/api/project_clusters.rb | 1 | ||||
-rw-r--r-- | lib/gitlab/ci/build/prerequisite/kubernetes_namespace.rb | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/lib/api/project_clusters.rb b/lib/api/project_clusters.rb index b62ec887183..dcc8d94fb79 100644 --- a/lib/api/project_clusters.rb +++ b/lib/api/project_clusters.rb @@ -54,6 +54,7 @@ module API 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' + optional :managed, type: Boolean, default: true, desc: 'Determines if GitLab will manage namespaces and service accounts for this cluster, defaults to true' 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' diff --git a/lib/gitlab/ci/build/prerequisite/kubernetes_namespace.rb b/lib/gitlab/ci/build/prerequisite/kubernetes_namespace.rb index bb2b209e793..dbdc59505ac 100644 --- a/lib/gitlab/ci/build/prerequisite/kubernetes_namespace.rb +++ b/lib/gitlab/ci/build/prerequisite/kubernetes_namespace.rb @@ -7,6 +7,7 @@ module Gitlab class KubernetesNamespace < Base def unmet? deployment_cluster.present? && + deployment_cluster.managed? && !deployment_cluster.project_type? && kubernetes_namespace.new_record? end |