diff options
author | Tiger Watson <twatson@gitlab.com> | 2019-06-21 06:55:30 +0300 |
---|---|---|
committer | Thong Kuah <tkuah@gitlab.com> | 2019-06-21 06:55:30 +0300 |
commit | a87f0f3937261486960c55d1791c9c04dd6e4171 (patch) | |
tree | 0fddf8c9d29e3fd17f0cc6838ba404ee4693082e /app/models/clusters/platforms/kubernetes.rb | |
parent | 148516ba36855095fa995c2d4e8077919cdb6db6 (diff) |
Remove project-level cluster credential fallback
Project-level clusters that made use of this legacy
behaviour have been migrated to unmanaged clusters,
so we are now free to remove this fallback.
Diffstat (limited to 'app/models/clusters/platforms/kubernetes.rb')
-rw-r--r-- | app/models/clusters/platforms/kubernetes.rb | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/app/models/clusters/platforms/kubernetes.rb b/app/models/clusters/platforms/kubernetes.rb index 272861cacf0..2afe471d1cc 100644 --- a/app/models/clusters/platforms/kubernetes.rb +++ b/app/models/clusters/platforms/kubernetes.rb @@ -91,19 +91,6 @@ module Clusters elsif kubernetes_namespace = cluster.kubernetes_namespaces.has_service_account_token.find_by(project: project) variables.concat(kubernetes_namespace.predefined_variables) - elsif cluster.project_type? - # As of 11.11 a user can create a cluster that they manage themselves, - # which replicates the existing project-level cluster behaviour. - # Once we have marked all project-level clusters that make use of this - # behaviour as "unmanaged", we can remove the `cluster.project_type?` - # check here. - project_namespace = cluster.kubernetes_namespace_for(project) - - variables - .append(key: 'KUBE_URL', value: api_url) - .append(key: 'KUBE_TOKEN', value: token, public: false, masked: true) - .append(key: 'KUBE_NAMESPACE', value: project_namespace) - .append(key: 'KUBECONFIG', value: kubeconfig(project_namespace), public: false, file: true) end variables.concat(cluster.predefined_variables) |