diff options
Diffstat (limited to 'app/models/clusters/concerns/application_status.rb')
-rw-r--r-- | app/models/clusters/concerns/application_status.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/app/models/clusters/concerns/application_status.rb b/app/models/clusters/concerns/application_status.rb index 93bdf9c223d..0e74cce29b7 100644 --- a/app/models/clusters/concerns/application_status.rb +++ b/app/models/clusters/concerns/application_status.rb @@ -64,6 +64,13 @@ module Clusters status_reason = transition.args.first app_status.status_reason = status_reason if status_reason end + + before_transition any => [:installed, :updated] do |app_status, _| + # 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. + app_status.cluster.application_helm.update!(version: Gitlab::Kubernetes::Helm::HELM_VERSION) + end end end |