Fixed GenericClient not propagating parameters into WatchAsync (#1500)

This commit is contained in:
Alex Zyl
2024-01-15 11:10:16 +01:00
committed by GitHub
parent b198b026de
commit 29f6d38ccd

View File

@@ -116,14 +116,14 @@ namespace k8s
where T : IKubernetesObject
{
var respTask = kubernetes.CustomObjects.ListClusterCustomObjectWithHttpMessagesAsync<T>(group, version, plural, watch: true, cancellationToken: cancel);
return respTask.WatchAsync<T, T>();
return respTask.WatchAsync<T, T>(onError, cancel);
}
public IAsyncEnumerable<(WatchEventType, T)> WatchNamespacedAsync<T>(string ns, Action<Exception> onError = null, CancellationToken cancel = default)
where T : IKubernetesObject
{
var respTask = kubernetes.CustomObjects.ListNamespacedCustomObjectWithHttpMessagesAsync<T>(group, version, ns, plural, watch: true, cancellationToken: cancel);
return respTask.WatchAsync<T, T>();
return respTask.WatchAsync<T, T>(onError, cancel);
}
public Watcher<T> Watch<T>(Action<WatchEventType, T> onEvent, Action<Exception> onError = null, Action onClosed = null)