test
This commit is contained in:
parent
9129813244
commit
6e9417a149
1 changed files with 7 additions and 3 deletions
10
main.py
10
main.py
|
@ -95,9 +95,13 @@ def watch_crd(group, version, plural):
|
|||
logging.info(f"Watching {group}/{version}/{plural}")
|
||||
|
||||
while True:
|
||||
stream = watch.Watch().stream(crds.list_cluster_custom_object,
|
||||
group=group, version=version, plural=plural,
|
||||
resource_version=resource_version)
|
||||
if resource_version != "":
|
||||
stream = watch.Watch().stream(crds.list_cluster_custom_object,
|
||||
group=group, version=version, plural=plural,
|
||||
resource_version=resource_version)
|
||||
else:
|
||||
stream = watch.Watch().stream(crds.list_cluster_custom_object,
|
||||
group=group, version=version, plural=plural)
|
||||
for event in stream:
|
||||
t = event["type"]
|
||||
obj = event["object"]
|
||||
|
|
Reference in a new issue