Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(Issue #167) Errant warning in Deployment Report when deprecated Ingress definitions aren't found #168

Merged
merged 2 commits into from
Jan 31, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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