Skip to content

Commit

Permalink
Merge pull request #168 from sassoftware/issue_167
Browse files Browse the repository at this point in the history
(Issue #167) Errant warning in Deployment Report when deprecated Ingress definitions aren't found
  • Loading branch information
sasjowood authored Jan 31, 2022
2 parents f603fd8 + 6b42e42 commit 9918e9c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
1 change: 1 addition & 0 deletions deployment_report/model/utils/ingress_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ def ignorable_for_controller_if_unavailable(ingress_controller: Text, resource_t
####################
elif ingress_controller == SupportedIngress.Controllers.NGINX and (
resource_type == ResourceTypeValues.CONTOUR_HTTP_PROXIES or
resource_type == ResourceTypeValues.K8S_EXTENSIONS_INGRESSES or
resource_type == ResourceTypeValues.OPENSHIFT_ROUTES or
resource_type == ResourceTypeValues.ISTIO_VIRTUAL_SERVICES
):
Expand Down
7 changes: 4 additions & 3 deletions deployment_report/model/utils/test/test_ingress_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,10 @@ def test_ignorable_for_controller_if_unavailable_nginx():
assert ingress_util.ignorable_for_controller_if_unavailable(
ingress_controller=SupportedIngress.Controllers.NGINX,
resource_type=ResourceTypeValues.CONTOUR_HTTP_PROXIES)
# Ingress (v1beta1 - deprecated)
assert ingress_util.ignorable_for_controller_if_unavailable(
ingress_controller=SupportedIngress.Controllers.NGINX,
resource_type=ResourceTypeValues.K8S_EXTENSIONS_INGRESSES)
# Route
assert ingress_util.ignorable_for_controller_if_unavailable(
ingress_controller=SupportedIngress.Controllers.NGINX,
Expand All @@ -248,9 +252,6 @@ def test_ignorable_for_controller_if_unavailable_nginx():
ingress_controller=SupportedIngress.Controllers.NGINX,
resource_type=ResourceTypeValues.K8S_CORE_PODS)
# Ingress
assert not ingress_util.ignorable_for_controller_if_unavailable(
ingress_controller=SupportedIngress.Controllers.NGINX,
resource_type=ResourceTypeValues.K8S_EXTENSIONS_INGRESSES)
assert not ingress_util.ignorable_for_controller_if_unavailable(
ingress_controller=SupportedIngress.Controllers.NGINX,
resource_type=ResourceTypeValues.K8S_NETWORKING_INGRESSES)
Expand Down

0 comments on commit 9918e9c

Please sign in to comment.