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

chore: remove support for netv1beta1.Ingress #3867

Merged
merged 3 commits into from
May 11, 2023

Conversation

pmalek
Copy link
Member

@pmalek pmalek commented Apr 7, 2023

What this PR does / why we need it:

This PR removes support for netv1beta1 Ingress which is not served anymore as of kubernetes 1.22+: https://kubernetes.io/docs/reference/using-api/deprecation-guide/#ingress-v122

Which issue this PR fixes:

Closes #1666

Special notes for your reviewer:

The service and route names had to be adjusted in tests (where I've managed to replace netv1beta1 with netv1 Ingresses).

Also RegexPriority is treated a little bit differently for v1 Ingresses:

RegexPriority: kong.Int(priorityForPath[*rulePath.PathType]),

Most of the changes required to be made were in internal/dataplane/parser/parser_test.go which instead of relying on v1beta1 Ingress, now relies on networking.k8s.io/v1 Ingress

PR Readiness Checklist:

Complete these before marking the PR as ready to review:

  • the CHANGELOG.md release notes have been updated to reflect any significant (and particularly user-facing) changes introduced by this PR

@pmalek pmalek added the area/maintenance (breaking) Maintenance requiring backwards-incompat changes (used to track the need for a new major release) label Apr 7, 2023
@pmalek pmalek self-assigned this Apr 7, 2023
@pmalek pmalek force-pushed the remove-support-netv1beta1-Ingress branch from 9009a38 to 3995d32 Compare April 20, 2023 10:28
@codecov
Copy link

codecov bot commented Apr 20, 2023

Codecov Report

❗ No coverage uploaded for pull request base (main@0593166). Click here to learn what that means.
Patch coverage: 100.0% of modified lines in pull request are covered.

Additional details and impacted files
@@          Coverage Diff           @@
##             main   #3867   +/-   ##
======================================
  Coverage        ?   58.4%           
======================================
  Files           ?     140           
  Lines           ?   15759           
  Branches        ?       0           
======================================
  Hits            ?    9219           
  Misses          ?    5915           
  Partials        ?     625           
Impacted Files Coverage Δ
...nal/controllers/configuration/object_references.go 87.3% <ø> (ø)
...trollers/configuration/zz_generated_controllers.go 27.3% <ø> (ø)
internal/controllers/utils/conversion.go 96.0% <ø> (ø)
internal/dataplane/parser/ingressrules.go 93.7% <ø> (ø)
internal/dataplane/parser/parser.go 75.4% <ø> (ø)
internal/dataplane/parser/translate_ingress.go 94.8% <ø> (ø)
internal/manager/conditions.go 100.0% <ø> (ø)
internal/manager/controllerdef.go 98.7% <ø> (ø)
internal/store/fake_store.go 58.7% <ø> (ø)
internal/store/store.go 56.4% <ø> (ø)
... and 1 more

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@mheap mheap added this to the KIC v2.10.0 milestone May 5, 2023
@pmalek pmalek force-pushed the remove-support-netv1beta1-Ingress branch from 3995d32 to 631f4c8 Compare May 9, 2023 10:12
@pmalek pmalek marked this pull request as ready for review May 9, 2023 11:07
@pmalek pmalek requested a review from a team as a code owner May 9, 2023 11:07
CHANGELOG.md Outdated Show resolved Hide resolved
@pmalek pmalek force-pushed the remove-support-netv1beta1-Ingress branch from 7f157ae to ed38e01 Compare May 9, 2023 13:25
czeslavo
czeslavo previously approved these changes May 9, 2023
Copy link
Contributor

@czeslavo czeslavo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹

@pmalek pmalek added the area/maintenance Cleanup, refactoring, and other maintenance improvements that don't change functionality. label May 10, 2023
@pmalek pmalek merged commit 35de761 into main May 11, 2023
31 checks passed
@pmalek pmalek deleted the remove-support-netv1beta1-Ingress branch May 11, 2023 09:24
rainest added a commit that referenced this pull request Sep 11, 2023
Remove Ingress API selection in favor of simply honoring the CLI disable
flag.

Support for Ingress versions other than networking/v1 was removed in
#3867. The API
selection code was only selecting between networking/v1 and nothing.
Future Kubernetes versions are not expected to abruptly remove the older
API versions if they introduce new Ingress versions, so this selection
code should not be necessary in the future.
@rainest rainest mentioned this pull request Sep 11, 2023
1 task
rainest added a commit that referenced this pull request Sep 11, 2023
Remove Ingress API selection in favor of simply honoring the CLI disable
flag.

Support for Ingress versions other than networking/v1 was removed in
#3867. The API
selection code was only selecting between networking/v1 and nothing.
Future Kubernetes versions are not expected to abruptly remove the older
API versions if they introduce new Ingress versions, so this selection
code should not be necessary in the future.
rainest added a commit that referenced this pull request Sep 11, 2023
Remove Ingress API selection in favor of simply honoring the CLI disable
flag.

Support for Ingress versions other than networking/v1 was removed in
#3867. The API
selection code was only selecting between networking/v1 and nothing.
Future Kubernetes versions are not expected to abruptly remove the older
API versions if they introduce new Ingress versions, so this selection
code should not be necessary in the future.
rainest added a commit that referenced this pull request Sep 11, 2023
Remove Ingress API selection in favor of simply honoring the CLI disable
flag.

Support for Ingress versions other than networking/v1 was removed in
#3867. The API
selection code was only selecting between networking/v1 and nothing.
Future Kubernetes versions are not expected to abruptly remove the older
API versions if they introduce new Ingress versions, so this selection
code should not be necessary in the future.
randmonkey pushed a commit that referenced this pull request Sep 12, 2023
* chore(docs) add #4641 changelog entry

* chore(controllers) remove Ingress API selection

Remove Ingress API selection in favor of simply honoring the CLI disable
flag.

Support for Ingress versions other than networking/v1 was removed in
#3867. The API
selection code was only selecting between networking/v1 and nothing.
Future Kubernetes versions are not expected to abruptly remove the older
API versions if they introduce new Ingress versions, so this selection
code should not be necessary in the future.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/maintenance (breaking) Maintenance requiring backwards-incompat changes (used to track the need for a new major release) area/maintenance Cleanup, refactoring, and other maintenance improvements that don't change functionality. size/XXL
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Delete ingress v1beta1 code paths (breaks k8s <1.19)
3 participants