diff options
author | Dylan Griffith <dyl.griffith@gmail.com> | 2018-02-12 14:22:15 +1100 |
---|---|---|
committer | Dylan Griffith <dyl.griffith@gmail.com> | 2018-02-15 17:01:11 +1100 |
commit | c1828eaed56159998d1eaafdaa135f1b3480549b (patch) | |
tree | 8cd903c910454bfdbc2bfdb1b1e9709eaa5583f1 /app/models/clusters | |
parent | 5ca692b0b04b4f349fb5a08b9dcc7d87c774934e (diff) | |
download | gitlab-ce-c1828eaed56159998d1eaafdaa135f1b3480549b.tar.gz |
Persist external IP of ingress controller created for GKE (#42643)
Diffstat (limited to 'app/models/clusters')
-rw-r--r-- | app/models/clusters/applications/ingress.rb | 7 | ||||
-rw-r--r-- | app/models/clusters/concerns/application_core.rb | 4 |
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 |