Skip to content

watch loses resource version when watching custom object list #700

@juliantaylor

Description

@juliantaylor

kubernetes often resets watches when no changes happen (kubernetes/kubernetes#55230 (comment)), thus I have added a restart at the last resource version to my application

But the python api library resets this to zero on iteration of this loop and thus retrieves all objects again.
https://github.com/kubernetes-client/python-base/blob/83ebb9d5fdc0d46bbb2e30afcd8eec42c5da4ad1/watch/watch.py
This happens in current master using the list_cluster_custom_object function as a watch running against kubernetes 1.12.3.

Can this please be updated to respect the resource version set by the application or fix that it resets to version zero each time.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions