lib/floe/container_runner/kubernetes.rb in floe-0.15.0 vs lib/floe/container_runner/kubernetes.rb in floe-0.15.1
- old
+ new
@@ -153,10 +153,12 @@
attr_reader :ca_file, :kubeconfig_file, :kubeconfig_context, :namespace, :server, :token, :verify_ssl
def pod_info(pod_name)
kubeclient.get_pod(pod_name, namespace)
+ rescue Kubeclient::HttpError => err
+ raise Floe::ExecutionError.new("Failed to get status for pod #{namespace}/#{pod_name}: #{err}")
end
def pod_running?(context)
RUNNING_PHASES.include?(context.dig("container_state", "phase"))
end
@@ -283,10 +285,11 @@
message = notice.object&.message
code = notice.object&.code
reason = notice.object&.reason
- logger.warn("Received [#{code} #{reason}], [#{message}]")
+ # This feels like a global concern and not an end user's concern
+ Floe.logger.warn("Received [#{code} #{reason}], [#{message}]")
true
end
def parse_notice(notice)