JuliaComputing/Kuber.jl

`watch` does not work for cluster wide resources

Closed this issue · 1 comments

Calling watch on cluster wide resources like Node or ClusterRole results in error:

julia> Kuber.watch(ctx.ctx, Kuber.get, :Node; namespace=nothing) do stream
       @show stream
       end
stream = Channel{Any}(1024)
ERROR: TaskFailedException

    nested task error: ArgumentError: No API functions could be located using Node
    Stacktrace:
     [1] get(ctx::Kuber.KuberWatchContext, O::Symbol; apiversion::Nothing, label_selector::Nothing, namespace::Nothing, max_tries::Int64, watch::Bool, resource_version::Nothing, kwargs::Base.Iterators.Pairs{Union{}, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
       @ Kuber ~/.julia/packages/Kuber/yHsvl/src/simpleapi.jl:204
     [2] macro expansion
       @ ~/.julia/packages/Kuber/yHsvl/src/simpleapi.jl:39 [inlined]
     [3] (::Kuber.var"#25#28"{Kuber.KuberWatchContext, Channel{Any}, Base.Iterators.Pairs{Symbol, Nothing, Tuple{Symbol}, NamedTuple{(:namespace,), Tuple{Nothing}}}, typeof(get), Tuple{Symbol}})()
       @ Kuber ./task.jl:411

fixed by #59