diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-20 15:08:44 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-20 15:08:44 +0000 |
commit | b9bac6dbf78a5a7976fba14aaeef96bdeb0da612 (patch) | |
tree | ffe277b562256f718b0818e8fd3c8fd8766d0269 /app/models/clusters | |
parent | 8c4198cbe631278e87fee04157d23494fbb80cdb (diff) | |
download | gitlab-ce-b9bac6dbf78a5a7976fba14aaeef96bdeb0da612.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/models/clusters')
-rw-r--r-- | app/models/clusters/concerns/application_core.rb | 2 | ||||
-rw-r--r-- | app/models/clusters/concerns/application_data.rb | 8 | ||||
-rw-r--r-- | app/models/clusters/concerns/application_status.rb | 5 |
3 files changed, 12 insertions, 3 deletions
diff --git a/app/models/clusters/concerns/application_core.rb b/app/models/clusters/concerns/application_core.rb index b94f2b15846..297d00aa281 100644 --- a/app/models/clusters/concerns/application_core.rb +++ b/app/models/clusters/concerns/application_core.rb @@ -15,7 +15,7 @@ module Clusters def set_initial_status return unless not_installable? - self.status = status_states[:installable] if cluster&.application_helm_available? || Feature.enabled?(:managed_apps_local_tiller) + self.status = status_states[:installable] if cluster&.application_helm_available? || ::Gitlab::Kubernetes::Helm.local_tiller_enabled? end def can_uninstall? diff --git a/app/models/clusters/concerns/application_data.rb b/app/models/clusters/concerns/application_data.rb index 3479fea415e..77c606553d2 100644 --- a/app/models/clusters/concerns/application_data.rb +++ b/app/models/clusters/concerns/application_data.rb @@ -23,7 +23,7 @@ module Clusters @files ||= begin files = { 'values.yaml': values } - files.merge!(certificate_files) if cluster.application_helm.has_ssl? + files.merge!(certificate_files) if use_tiller_ssl? files end @@ -31,6 +31,12 @@ module Clusters private + def use_tiller_ssl? + return false if ::Gitlab::Kubernetes::Helm.local_tiller_enabled? + + cluster.application_helm.has_ssl? + end + def certificate_files { 'ca.pem': ca_cert, diff --git a/app/models/clusters/concerns/application_status.rb b/app/models/clusters/concerns/application_status.rb index b63a596dfee..14237439a8d 100644 --- a/app/models/clusters/concerns/application_status.rb +++ b/app/models/clusters/concerns/application_status.rb @@ -92,7 +92,10 @@ module Clusters # When installing any application we are also performing an update # of tiller (see Gitlab::Kubernetes::Helm::ClientCommand) so # therefore we need to reflect that in the database. - application.cluster.application_helm.update!(version: Gitlab::Kubernetes::Helm::HELM_VERSION) + + unless ::Gitlab::Kubernetes::Helm.local_tiller_enabled? + application.cluster.application_helm.update!(version: Gitlab::Kubernetes::Helm::HELM_VERSION) + end end after_transition any => [:uninstalling], :use_transactions => false do |application, _| |