lib/k8s_kit/context.rb in k8s_kit-0.0.1 vs lib/k8s_kit/context.rb in k8s_kit-0.0.2
- old
+ new
@@ -41,17 +41,21 @@
end
def wait_for_all_pods_ready(timeout: 300)
t0 = Time.now
+ print 'Waiting for all pods to be ready...'
loop do
statuses = run('get pods -o jsonpath="{.items.*.status.containerStatuses[*].ready}"')
return unless statuses.include?('false')
- raise StandardError, 'Timeout while waiting for pods to become ready' if t0 + timeout < Time.now
+ if t0 + timeout < Time.now
+ puts ''
+ raise StandardError, 'Timeout while waiting for pods to become ready'
+ end
- puts 'Some pods are not ready yet, retrying...'
- sleep 5
+ print '.'
+ sleep 2
end
end
end
end