Skip to content

Commit

Permalink
feat: add timeout_seconds option to Kubeclient::Client#watch_entities
Browse files Browse the repository at this point in the history
  • Loading branch information
jperville committed Nov 21, 2023
1 parent 054bff2 commit 2166c6f
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions lib/kubeclient.rb
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,11 @@ class Client
}.freeze

WATCH_ARGUMENTS = {
'labelSelector' => :label_selector,
'fieldSelector' => :field_selector,
'resourceVersion' => :resource_version,
'allowWatchBookmarks' => :allow_watch_bookmarks
'labelSelector' => :label_selector,
'fieldSelector' => :field_selector,
'resourceVersion' => :resource_version,
'allowWatchBookmarks' => :allow_watch_bookmarks,
'timeoutSeconds' => :timeout_seconds
}.freeze

attr_reader :api_endpoint
Expand Down Expand Up @@ -408,6 +409,7 @@ def faraday_client
# :label_selector (string) - a selector to restrict the list of returned objects by labels.
# :field_selector (string) - a selector to restrict the list of returned objects by fields.
# :resource_version (string) - shows changes that occur after passed version of a resource.
# :timeout_seconds (integer) - limits the duration of the call
# :as (:raw|:ros) - defaults to :ros
# :raw - return the raw response body as a string
# :ros - return a collection of RecursiveOpenStruct objects
Expand Down Expand Up @@ -493,7 +495,7 @@ def delete_entity(resource_name, name, namespace = nil, delete_options: {})
# :resource_version (string) - sets a limit on the resource versions that can be served
# :resource_version_match (string) - determines how the resource_version constraint
# will be applied
# :timeout_seconds (integer) - limits the duraiton of the call
# :timeout_seconds (integer) - limits the duration of the call
# :continue (string) - a token used to retrieve the next chunk of entities
# :as (:raw|:ros) - defaults to :ros
# :raw - return the raw response body as a string
Expand Down

0 comments on commit 2166c6f

Please sign in to comment.