diff --git a/cloudflare_dns.py b/cloudflare_dns.py index 79eaeef..01f90ac 100755 --- a/cloudflare_dns.py +++ b/cloudflare_dns.py @@ -43,8 +43,7 @@ def delete_record(record_id, zone_id): } response = requests.request("DELETE", url, headers=headers).json() - print(response) - return response.get("success", False) + return response["success"] def add_record(ip_addr, subdomain, zone_id): # adds a DNS A record to the zone and diff --git a/main.py b/main.py index a5d8abf..f1e9467 100755 --- a/main.py +++ b/main.py @@ -16,6 +16,8 @@ # check domain_subdomain_ips print(domain_to_zone_id) print(domain_subdomain_ips) + +# this interval needs to be adjusted so that the previous pod in k8s is destroyed before the code below runs in the current pod time.sleep(30) # initialization of variables