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(api_version : String, kind : String, namespace : String | Nil = nil)
- #client_for_resource(resource : T.class, namespace : String | Nil = nil) : ResourceClient(T) forall T
-
#find_api_resource(resource_name)
raises
K8s::Error::UndefinedResource
if resource not found -
#list_resources(resources : 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(api_version : String, kind : String, namespace : String | Nil = nil)
#
def client_for_resource(resource : T.class, namespace : String | Nil = nil) : ResourceClient(T) forall T
#
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