Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDylan Griffith <dyl.griffith@gmail.com>2018-02-12 06:22:15 +0300
committerDylan Griffith <dyl.griffith@gmail.com>2018-02-15 09:01:11 +0300
commitc1828eaed56159998d1eaafdaa135f1b3480549b (patch)
tree8cd903c910454bfdbc2bfdb1b1e9709eaa5583f1 /app/models/clusters
parent5ca692b0b04b4f349fb5a08b9dcc7d87c774934e (diff)
Persist external IP of ingress controller created for GKE (#42643)
Diffstat (limited to 'app/models/clusters')
-rw-r--r--app/models/clusters/applications/ingress.rb7
-rw-r--r--app/models/clusters/concerns/application_core.rb4
2 files changed, 11 insertions, 0 deletions
diff --git a/app/models/clusters/applications/ingress.rb b/app/models/clusters/applications/ingress.rb
index aa5cf97756f..5e9086aecca 100644
--- a/app/models/clusters/applications/ingress.rb
+++ b/app/models/clusters/applications/ingress.rb
@@ -13,6 +13,8 @@ module Clusters
nginx: 1
}
+ IP_ADDRESS_FETCH_RETRIES = 3
+
def chart
'stable/nginx-ingress'
end
@@ -24,6 +26,11 @@ module Clusters
def install_command
Gitlab::Kubernetes::Helm::InstallCommand.new(name, chart: chart, chart_values_file: chart_values_file)
end
+
+ def post_install
+ ClusterWaitForIngressIpAddressWorker.perform_in(
+ ClusterWaitForIngressIpAddressWorker::INTERVAL, name, id, IP_ADDRESS_FETCH_RETRIES)
+ end
end
end
end
diff --git a/app/models/clusters/concerns/application_core.rb b/app/models/clusters/concerns/application_core.rb
index a98fa85a5ff..b047fbce214 100644
--- a/app/models/clusters/concerns/application_core.rb
+++ b/app/models/clusters/concerns/application_core.rb
@@ -23,6 +23,10 @@ module Clusters
def name
self.class.application_name
end
+
+ def post_install
+ # Override for any extra work that needs to be done after install
+ end
end
end
end