diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-27 15:09:24 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-27 15:09:24 +0000 |
commit | f8d15ca65390475e356b06dedc51e10ccd179f86 (patch) | |
tree | ef916d4e8e11c9e00d809e5cdcf63814e86d6e89 /app/models/clusters | |
parent | 3ab4feda4dce9c9f0672375ae27c2f7c2ba6f4ad (diff) | |
download | gitlab-ce-f8d15ca65390475e356b06dedc51e10ccd179f86.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/models/clusters')
-rw-r--r-- | app/models/clusters/applications/knative.rb | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/app/models/clusters/applications/knative.rb b/app/models/clusters/applications/knative.rb index eebcbcba2d3..1f90318f845 100644 --- a/app/models/clusters/applications/knative.rb +++ b/app/models/clusters/applications/knative.rb @@ -33,6 +33,12 @@ module Clusters FETCH_IP_ADDRESS_DELAY, application.name, application.id) end end + + after_transition any => [:installed, :updated] do |application| + application.run_after_commit do + ClusterConfigureIstioWorker.perform_async(application.cluster_id) + end + end end default_value_for :version, VERSION @@ -41,6 +47,8 @@ module Clusters scope :for_cluster, -> (cluster) { where(cluster: cluster) } + has_one :pages_domain, through: :serverless_domain_cluster + def chart 'knative/knative' end @@ -49,6 +57,14 @@ module Clusters { "domain" => hostname }.to_yaml end + def available_domains + PagesDomain.instance_serverless + end + + def find_available_domain(pages_domain_id) + available_domains.find_by(id: pages_domain_id) + end + def allowed_to_uninstall? !pre_installed? end |