class Kube::ApiClient

Defined in:

kube/api_client.cr

Constructors

Class Method Summary

Instance Method Summary

Constructor Detail

def self.new(transport : Transport, api_version : String) #

[View source]

Class Method Detail

def self.logger #

[View source]
def self.path(api_version : String) : String #

api_version : either core version (v1) or apigroup/apiversion (apps/v1)


[View source]

Instance Method Detail

def api_resources : Array(K8S::Apimachinery::Apis::Meta::V1::APIResource) #

Cached APIResources


[View source]
def api_resources! : Array(K8S::Apimachinery::Apis::Meta::V1::APIResource) #

Force-update APIResources


[View source]
def api_resources? : Bool #

api_resources loaded yet?


[View source]
def api_version : String #

[View source]
def client_for_resource(api_version : String, kind : String, namespace : String | Nil = nil) #

[View source]
def client_for_resource(resource : T.class, namespace : String | Nil = nil) : ResourceClient(T) forall T #

[View source]
def find_api_resource(resource_name) #

raises K8s::Error::UndefinedResource if resource not found


[View source]
def list_resources(resources : Array(Kube::ResourceClient) | Nil = nil, **options) : Indexable #

Pipeline list requests for multiple resource types.

Returns flattened array with mixed resource kinds.


[View source]
def logger #

[View source]
def path(*path) #

[View source]
def resource(resource_name, namespace : String | Nil = nil) : ResourceClient #

[View source]
def resources(namespace : String | Nil = nil) #

If namespace is given, non-namespaced resources will be skipped


[View source]