diff --git a/kube_resource_report/report.py b/kube_resource_report/report.py index c2dd5dd..5c70b90 100755 --- a/kube_resource_report/report.py +++ b/kube_resource_report/report.py @@ -303,7 +303,7 @@ def query_cluster( namespace, name = item["metadata"]["namespace"], item["metadata"]["name"] labels = item["metadata"].get("labels", {}) application = labels.get("application", labels.get("app", "")) - for rule in item["spec"]["rules"]: + for rule in item["spec"].get("rules", []): host = rule.get('host', '') ingress = [namespace, name, application, host, 0] if host and not no_ingress_status: