Skip to content

Commit

Permalink
Merge pull request #17 from SQuent/fix/update
Browse files Browse the repository at this point in the history
fix(update): try to update always when ingressroute change
  • Loading branch information
SQuent authored Jul 4, 2024
2 parents 9e84538 + c0d544a commit d2dc2c6
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 d2dc2c6

Please sign in to comment.