Skip to content

Add ingress class#167

Merged
k8s-ci-robot merged 2 commits intokubernetes-sigs:mainfrom
sawsa307:add-ingress-class
Jul 22, 2024
Merged

Add ingress class#167
k8s-ci-robot merged 2 commits intokubernetes-sigs:mainfrom
sawsa307:add-ingress-class

Conversation

@sawsa307
Copy link
Copy Markdown
Contributor

What type of PR is this?
/kind bug

What this PR does / why we need it:
Make sure Gateway name is not empty when the GKE ingress class name is not specified.

Which issue(s) this PR fixes:
Fixes #87

Does this PR introduce a user-facing change?:

Fixed an issue that when the ingress class annotation is not specified on a GKE Ingress, the translation would result in a Gateway without name.

@k8s-ci-robot k8s-ci-robot added the kind/bug Categorizes issue or PR as related to a bug. label Jul 12, 2024
@k8s-ci-robot k8s-ci-robot requested review from Xunzhuo and levikobi July 12, 2024 05:20
@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Jul 12, 2024
@k8s-ci-robot k8s-ci-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Jul 12, 2024
@sawsa307
Copy link
Copy Markdown
Contributor Author

/assign @LiorLieberman

@sawsa307 sawsa307 force-pushed the add-ingress-class branch from 8a646b6 to b4766aa Compare July 13, 2024 23:48
@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Jul 13, 2024
@sawsa307 sawsa307 force-pushed the add-ingress-class branch from b4766aa to f2bfeab Compare July 13, 2024 23:49
@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Jul 16, 2024
@LiorLieberman
Copy link
Copy Markdown
Member

Thanks David, mind adding a test for it?

@LiorLieberman
Copy link
Copy Markdown
Member

/cc

@sawsa307
Copy link
Copy Markdown
Contributor Author

Thanks David, mind adding a test for it?

Just added one. Please take a look!

@k8s-ci-robot k8s-ci-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Jul 16, 2024
@sawsa307 sawsa307 force-pushed the add-ingress-class branch from 681cc3d to 0ed6c46 Compare July 16, 2024 16:17
Comment thread pkg/i2gw/providers/gce/converter_test.go
Comment thread pkg/i2gw/providers/gce/converter.go Outdated
* Translation uses the ingressClassName to determine the Gateway name.
  GKE supports empty ingress class name, which would default to be
  external Ingress.
* However, it allows the resulting Gateway to have no name. Thus, we
  should manually patch the ingress class name for those Ingresses that
  do not specify the ingress class name annotation.
* The patching will happen during resource read, so we won't run into
  situation that converts an GKE Ingress without Ingress class name. It
  should either be gce or gce-internal.
Copy link
Copy Markdown
Member

@LiorLieberman LiorLieberman left a comment

Choose a reason for hiding this comment

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

Thank you david!
/approve
/lgtm

Comment thread pkg/i2gw/providers/gce/converter_test.go
@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jul 22, 2024
@k8s-ci-robot
Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: LiorLieberman, sawsa307

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 22, 2024
@k8s-ci-robot k8s-ci-robot merged commit c8abfc1 into kubernetes-sigs:main Jul 22, 2024
rajashish pushed a commit to rajashish/ingress2gateway1 that referenced this pull request Feb 21, 2026
* Run go mod tidy && go mod vendor

* Manually add ingressClassName for GCE Ingress that has empty class name.

* Translation uses the ingressClassName to determine the Gateway name.
  GKE supports empty ingress class name, which would default to be
  external Ingress.
* However, it allows the resulting Gateway to have no name. Thus, we
  should manually patch the ingress class name for those Ingresses that
  do not specify the ingress class name annotation.
* The patching will happen during resource read, so we won't run into
  situation that converts an GKE Ingress without Ingress class name. It
  should either be gce or gce-internal.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/bug Categorizes issue or PR as related to a bug. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add support for GCE ingress class/provider

4 participants