class Kube::ApiClient
- Kube::ApiClient
- Reference
- Object
Defined in:
kube/api_client.crConstructors
Class Method Summary
- .logger
-
.path(api_version : String) : String
api_version : either core version (v1) or apigroup/apiversion (apps/v1)
Instance Method Summary
-
#api_resources : Array(K8S::Apimachinery::Apis::Meta::V1::APIResource)
Cached APIResources
-
#api_resources! : Array(K8S::Apimachinery::Apis::Meta::V1::APIResource)
Force-update APIResources
-
#api_resources? : Bool
api_resources loaded yet?
- #api_version : String
- #client_for_resource(kind : String, namespace : String | Nil = nil, api_resource : K8S::Apimachinery::Apis::Meta::V1::APIResource | Nil = nil)
- #client_for_resource(resource : K8S::Apimachinery::Apis::Meta::V1::APIResource, namespace : String | Nil = nil)
- #client_for_resource(resource : X.class, namespace : String | Nil = nil, api_resource : K8S::Apimachinery::Apis::Meta::V1::APIResource | Nil = nil) forall X
- #client_for_subresource(resource : K8S::Apimachinery::Apis::Meta::V1::APIResource, namespace : String | Nil = nil)
-
#find_api_resource(resource_name)
raises
K8s::Error::UndefinedResource
if resource not found -
#find_api_resource_by_kind(kind)
raises
K8s::Error::UndefinedResource
if resource not found -
#list_resources(resource_list : Array(Kube::ResourceClient) | Nil = nil, **options) : Indexable
Pipeline list requests for multiple resource types.
- #logger
- #path(*path)
- #resource(resource_name, namespace : String | Nil = nil) : ResourceClient
-
#resources(namespace : String | Nil = nil)
If namespace is given, non-namespaced resources will be skipped
Constructor Detail
Class Method Detail
def self.path(api_version : String) : String
#
api_version : either core version (v1) or apigroup/apiversion (apps/v1)
Instance Method Detail
def api_resources! : Array(K8S::Apimachinery::Apis::Meta::V1::APIResource)
#
Force-update APIResources
def client_for_resource(kind : String, namespace : String | Nil = nil, api_resource : K8S::Apimachinery::Apis::Meta::V1::APIResource | Nil = nil)
#
def client_for_resource(resource : K8S::Apimachinery::Apis::Meta::V1::APIResource, namespace : String | Nil = nil)
#
def client_for_resource(resource : X.class, namespace : String | Nil = nil, api_resource : K8S::Apimachinery::Apis::Meta::V1::APIResource | Nil = nil) forall X
#
def client_for_subresource(resource : K8S::Apimachinery::Apis::Meta::V1::APIResource, namespace : String | Nil = nil)
#
def list_resources(resource_list : Array(Kube::ResourceClient) | Nil = nil, **options) : Indexable
#
Pipeline list requests for multiple resource types.
Returns flattened array with mixed resource kinds.
def resources(namespace : String | Nil = nil)
#
If namespace is given, non-namespaced resources will be skipped