-
Notifications
You must be signed in to change notification settings - Fork 311
Description
Describe the bug
In version 6.0.4 the following code works when resourceVersion is null or has a value:
await _k8SClient.ListNamespacedSecretWithHttpMessagesAsync(
_namespace,
labelSelector: labelSelector,
watch: true,
resourceVersion: resourceVersion,
timeoutSeconds: 300,
cancellationToken: _cancellationTokenSource.Token
)After updating to 17.0.14 version, the code:
await _k8SClient.CoreV1.ListNamespacedSecretWithHttpMessagesAsync(
_namespace,
labelSelector: labelSelector,
watch: true,
resourceVersion: resourceVersion,
timeoutSeconds: 300,
cancellationToken: _cancellationTokenSource.Token
)fails when resourceVersion has a value and throws EndOfStreamException.
But when resourceVersion is null, the method returns a valid result.
Starting from version 8.0.4, after moving the method ListNamespacedSecretWithHttpMessagesAsync into CoreV1, the method throws EndOfStreamException if resourceVersion has a value (not null).
Kubernetes C# SDK Client Version
17.0.14
Server Kubernetes Version
1.34.2
Dotnet Runtime Version
net8
To Reproduce
Call method where resourceVersion has a value.
Expected behavior
Not to throw an exception when resourceVersion is not null
Additional context
@ShirmanDenis This exception is the same as for #1675, but the exception is thrown before calling Watch():
using var watcher = (await _k8SClient.CoreV1.ListNamespacedSecretWithHttpMessagesAsync(
_namespace,
labelSelector: labelSelector,
watch: true,
resourceVersion: resourceVersion,
timeoutSeconds: 300,
cancellationToken: _cancellationTokenSource.Token)
).Watch<V1Secret, V1SecretList>(...)