Method: K8s::Client#list_resources
- Defined in:
- lib/k8s/client.rb
#list_resources(resources = nil, **options) ⇒ Array<K8s::Resource>
Pipeline list requests for multiple resource types.
Returns flattened array with mixed resource kinds.
198 199 200 201 202 203 204 205 206 207 208 209 210 211 |
# File 'lib/k8s/client.rb', line 198 def list_resources(resources = nil, **) cached_clients = @api_clients.size.positive? resources ||= self.resources.select(&:list?) begin ResourceClient.list(resources, @transport, **) rescue K8s::Error::NotFound raise unless cached_clients cached_clients = false api_groups! retry end end |