class Kube::ResourceClient(T)
- Kube::ResourceClient(T)
- Reference
- Object
Overview
Per-APIResource type client.
Used to get/list/update/patch/delete specific types of resources, optionally in some specific namespace.
Included Modules
Extended Modules
Defined in:
kube/resource_client.crConstructors
Class Method Summary
-
.list(resources : Array(ResourceClient), transport : Transport, namespace : String | Nil = nil, label_selector = nil, field_selector = nil, skip_forbidden = false) : Indexable
Pipeline list requests for multiple resource types.
- .logger
Instance Method Summary
- #api_resource : K8S::Apimachinery::Apis::Meta::V1::APIResource
- #api_version : String
- #create? : Bool
-
#create_resource(resource : T) : T
resource [#metadata] with metadata.namespace and metadata.name set
-
#delete(name, namespace = @namespace, propagation_policy = nil) : T
name [String] namespace [String, nil] propagationPolicy [String, nil] The propagationPolicy to use for the API call.
- #delete? : Bool
-
#delete_collection(namespace = @namespace, label_selector : String | Hash(String, String) | Nil = nil, field_selector : String | Hash(String, String) | Nil = nil, propagation_policy : String | Nil = nil) : Indexable(T)
returns array of instances of resource_class
-
#delete_resource(resource : T, **options)
resource [resource_class] with metadata options [Hash] see #delete for possible options
-
#get(resource : T) : T
raises [
Kube::Error::NotFound
] if resource is not found -
#get(name, namespace = @namespace) : T
raises [
Kube::Error::NotFound
] if resource is not found - #get? : Bool
-
#get_as_string(name, namespace = @namespace)
returns response body as a String instead of T
-
#json_patch(name, ops, namespace = @namespace) : T
name [String] ops [Hash] json-patch operations namespace [String, nil]
- #kind
-
#list(label_selector : String | Hash(String, String) | Nil = nil, field_selector : String | Hash(String, String) | Nil = nil, namespace = @namespace) : Indexable(T)
returns array of instances of resource_class
- #list?
- #logger
-
#merge_patch(name, obj, namespace = @namespace, strategic_merge = true) : T
name [String] obj [#to_json] namespace [String, nil] strategic_merge [Boolean] use kube Strategic Merge Patch instead of standard Merge Patch (arrays of objects are merged by name)
- #meta_list(label_selector : String | Hash(String, String) | Nil = nil, field_selector : String | Hash(String, String) | Nil = nil, namespace = @namespace)
-
#name : String
resource or resource/subresource
- #namespace : String | Nil
- #namespaced? : Bool
- #patch? : Bool
- #path(name = nil, subresource = @subresource, namespace = @namespace)
- #process_list(list : X) : Indexable(T) forall X
- #resource : String
- #subresource : String | Nil
- #subresource?
- #update? : Bool
-
#update_resource(resource : T) : T
returns instance of resource_class
- #watch(label_selector : String | Hash(String, String) | Nil = nil, field_selector : String | Hash(String, String) | Nil = nil, resource_version : String | Nil = nil, timeout : Int32 | Nil = nil, namespace = @namespace) : Kube::WatchChannel(T)
Instance methods inherited from module Kube::ResourceClient::Utils
make_query(options) : Hash(String, String | Array(String)) | Nil
make_query,
selector_query(selector : String | Symbol | Hash(String, String) | Nil) : String | Nil
selector_query
Constructor Detail
Class Method Detail
Pipeline list requests for multiple resource types.
Returns flattened array with mixed resource kinds.
skip_forbidden
[Boolean] skip resources that return HTTP 403 errors
Instance Method Detail
resource [#metadata] with metadata.namespace and metadata.name set
name [String] namespace [String, nil] propagationPolicy [String, nil] The propagationPolicy to use for the API call. Possible values include “Orphan”, “Foreground”, or “Background”
returns array of instances of resource_class
resource [resource_class] with metadata options [Hash] see #delete for possible options
name [String] ops [Hash] json-patch operations namespace [String, nil]
returns array of instances of resource_class
name [String] obj [#to_json] namespace [String, nil] strategic_merge [Boolean] use kube Strategic Merge Patch instead of standard Merge Patch (arrays of objects are merged by name)