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}")
|
logging.info(f"Watching {group}/{version}/{plural}")
|
||||||
|
|
||||||
while True:
|
while True:
|
||||||
stream = watch.Watch().stream(crds.list_cluster_custom_object,
|
if resource_version != "":
|
||||||
group=group, version=version, plural=plural,
|
stream = watch.Watch().stream(crds.list_cluster_custom_object,
|
||||||
resource_version=resource_version)
|
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:
|
for event in stream:
|
||||||
t = event["type"]
|
t = event["type"]
|
||||||
obj = event["object"]
|
obj = event["object"]
|
||||||
|
|
Reference in a new issue