Class: Clusters::Applications::CheckIngressIpAddressService
- Inherits:
-
BaseHelmService
- Object
- BaseHelmService
- Clusters::Applications::CheckIngressIpAddressService
- Includes:
- Gitlab::Utils::StrongMemoize
- Defined in:
- app/services/clusters/applications/check_ingress_ip_address_service.rb
Constant Summary collapse
- Error =
Class.new(StandardError)
- LEASE_TIMEOUT =
15.seconds.to_i
Instance Attribute Summary
Attributes inherited from BaseHelmService
Instance Method Summary collapse
Methods included from Gitlab::Utils::StrongMemoize
#clear_memoization, #strong_memoize, #strong_memoized?
Methods inherited from BaseHelmService
Constructor Details
This class inherits a constructor from Clusters::Applications::BaseHelmService
Instance Method Details
#execute ⇒ Object
12 13 14 15 16 17 18 19 20 21 |
# File 'app/services/clusters/applications/check_ingress_ip_address_service.rb', line 12 def execute return if app.external_ip return if app.external_hostname return unless try_obtain_lease app.external_ip = ingress_ip if ingress_ip app.external_hostname = ingress_hostname if ingress_hostname app.save! if app.changed? end |