class Vidar::DeployStatus

Constants

INITIAL_SLEEP
MAX_TRIES
SLEEP

Attributes

filter[R]
max_tries[R]
namespace[R]

Public Class Methods

new(namespace:, filter: nil, max_tries: MAX_TRIES) click to toggle source
# File lib/vidar/deploy_status.rb, line 9
def initialize(namespace:, filter: nil, max_tries: MAX_TRIES)
  @namespace = namespace
  @filter = filter
  @max_tries = max_tries
end

Public Instance Methods

last_pod_set() click to toggle source
# File lib/vidar/deploy_status.rb, line 34
def last_pod_set
  @pod_set
end
pod_set() click to toggle source
# File lib/vidar/deploy_status.rb, line 38
def pod_set
  @pod_set = K8s::PodSet.new(namespace: namespace, filter: filter)
end
success?() click to toggle source
# File lib/vidar/deploy_status.rb, line 29
def success?
  return false unless last_pod_set
  last_pod_set.success?
end
wait_until_completed() click to toggle source
# File lib/vidar/deploy_status.rb, line 15
def wait_until_completed
  tries = 0

  sleep(INITIAL_SLEEP)

  until pod_set.deployed?
    tries += 1
    sleep(SLEEP)
    if tries > max_tries
      break
    end
  end
end