Skip to content

Commit

Permalink
fix(update): try to update always when ingressroute change
Browse files Browse the repository at this point in the history
  • Loading branch information
SQuent committed Jul 4, 2024
1 parent a2ab844 commit c0d544a
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions kuma_ingress_watcher/controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,7 @@ def create_or_update_monitor(name, url, interval, probe_type, headers, method):
try:
monitors = kuma.get_monitors()
for monitor in monitors:
if monitor['name'] == name and monitor['url'] == url:
logger.info(f"Monitor already exists for {name} with same URL. Skipping creation.")
return
elif monitor['name'] == name:
if monitor['name'] == name:
logger.info(f"Updating monitor for {name} with URL: {url}")
kuma.edit_monitor(monitor['id'], url=url, type=probe_type, headers=headers, method=method, interval=interval)
return
Expand Down

0 comments on commit c0d544a

Please sign in to comment.