lib/kubeclient/common.rb
# Accepts the following string options:
#   :namespace - the namespace of the entity.
#   :name - the name of the entity to watch.
#   :label_selector - a selector to restrict the list of returned objects by their labels.
#   :field_selector - a selector to restrict the list of returned objects by their fields.
#   :resource_version - shows changes that occur after that particular version of a resource.
Accepts the following string options:
:namespace - the namespace of the entity.
:name - the name of the entity to watch.
:label_selector - a selector to restrict the list of returned objects by their labels.
:field_selector - a selector to restrict the list of returned objects by their fields.
:resource_version - shows changes that occur after that particular version of a resource.
Accepts the following string options : : namespace - the namespace of the entity . : name - the name of the entity to watch . : label_selector - a selector to restrict the list of returned objects by their labels . : field_selector - a selector to restrict the list of returned objects by their fields . : resource_version - shows changes that occur after that particular version of a resource .
def watch_entities(entity_type, options = {})
      ns = build_namespace_prefix(options[:namespace])
      path = "watch/#{ns}#{resource_name(entity_type.to_s)}"
      path += "/#{options[:name]}" if options[:name]
      uri = @api_endpoint.merge("#{@api_endpoint.path}/#{@api_version}/#{path}")
      params = options.slice(:label_selector, :field_selector, :resource_version)
      if params.any?
        uri.query = URI.encode_www_form(params.map { |k, v| [k.to_s.camelize(:lower), v] })
      end
      Kubeclient::Common::WatchStream.new(uri, http_options(uri))
    end
def watch_entities ( entity_type , options = { } ) ns = build_namespace_prefix ( options [ :namespace ] ) path = "watch/#{ns}#{resource_name(entity_type.to_s)}" path += "/#{options[:name]}" if options [ :name ] uri = @api_endpoint . merge ( "#{@api_endpoint.path}/#{@api_version}/#{path}" ) params = options . slice ( :label_selector , :field_selector , :resource_version ) if params . any? uri . query = URI . encode_www_form ( params . map { | k , v | [ k . to_s . camelize ( :lower ) , v ] } ) end Kubeclient :: Common :: WatchStream . new ( uri , http_options ( uri ) ) end
Accepts the following string options:
:namespace - the namespace of the entity.
Accepts the following string options : : namespace - the namespace of the entity .
entity_type
<not_specific>
options
<not_specific>