class Krane::DaemonSet
def find_nodes(cache)
def find_nodes(cache) all_nodes = cache.get_all(Node.kind) all_nodes.each_with_object([]) do |node_data, relevant_nodes| next if node_data.dig('spec', 'unschedulable').to_s.downcase == 'true' cond = node_data.dig('status', 'conditions').find { |c| c['type'].downcase == 'ready' } next if (!cond.nil? && cond['status'].downcase != 'true') relevant_nodes << Node.new(definition: node_data) end end