Skip to content

Fix OIDC authentication support#245

Merged
k8s-ci-robot merged 3 commits intokubernetes-sigs:mainfrom
jpiper:patch-1
Sep 3, 2025
Merged

Fix OIDC authentication support#245
k8s-ci-robot merged 3 commits intokubernetes-sigs:mainfrom
jpiper:patch-1

Conversation

@jpiper
Copy link
Copy Markdown
Contributor

@jpiper jpiper commented Sep 2, 2025

What type of PR is this?
/kind bug

What this PR does / why we need it:

The imports the k8s OIDC libraries so that OIDC authentication to the kubernetes apiserver works. At the moment, if you are trying to run ingress2gateway against a kubernetes cluster that is configured in your kubeconfig to use OIDC, you get the following error

$ ./ingress2gateway print --providers ingress-nginx
Error: failed to create client: no Auth Provider found for name "oidc"
...

Once the OIDC auth libraries are imported this now works fine

$ ./ingress2gateway print --providers ingress-nginx -n piperj
No resources found in piperj namespace

This should also fix GCP and Azure logins as well as those auth libraries are part of this fix as well.

Which issue(s) this PR fixes:

Fixes #215

Does this PR introduce a user-facing change?:

Fix invocations for OIDC-enabled clusters from kubeconfig

@k8s-ci-robot k8s-ci-robot added the kind/bug Categorizes issue or PR as related to a bug. label Sep 2, 2025
@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Sep 2, 2025
@k8s-ci-robot k8s-ci-robot requested a review from rikatz September 2, 2025 18:08
@k8s-ci-robot
Copy link
Copy Markdown
Contributor

Welcome @jpiper!

It looks like this is your first PR to kubernetes-sigs/ingress2gateway 🎉. Please refer to our pull request process documentation to help your PR have a smooth ride to approval.

You will be prompted by a bot to use commands during the review process. Do not be afraid to follow the prompts! It is okay to experiment. Here is the bot commands documentation.

You can also check if kubernetes-sigs/ingress2gateway has its own contribution guidelines.

You may want to refer to our testing guide if you run into trouble with your tests not passing.

If you are having difficulty getting your pull request seen, please follow the recommended escalation practices. Also, for tips and tricks in the contribution process you may want to read the Kubernetes contributor cheat sheet. We want to make sure your contribution gets all the attention it needs!

Thank you, and welcome to Kubernetes. 😃

@k8s-ci-robot k8s-ci-robot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Sep 2, 2025
@k8s-ci-robot
Copy link
Copy Markdown
Contributor

Hi @jpiper. Thanks for your PR.

I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@k8s-ci-robot k8s-ci-robot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Sep 2, 2025
@rikatz
Copy link
Copy Markdown
Member

rikatz commented Sep 2, 2025

/ok-to-test
@jpiper can you just provide an example of how this failed, just to be clear on the PR description? eg.: where you on a cloud provider, you did logged in and by some reason something failed?

Thanks!

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Sep 2, 2025
@jpiper
Copy link
Copy Markdown
Contributor Author

jpiper commented Sep 3, 2025

Hi @rikatz I've added some more detail to the PR and fixed the build! Thanks

@rikatz
Copy link
Copy Markdown
Member

rikatz commented Sep 3, 2025

/lgtm
Thanks!

/cc @LiorLieberman

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Sep 3, 2025
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.

Sweet, thank you @jpiper!

/approve
/lgtm

@k8s-ci-robot
Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

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

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 Sep 3, 2025
@k8s-ci-robot k8s-ci-robot merged commit ef08fb8 into kubernetes-sigs:main Sep 3, 2025
4 checks passed
@jpiper jpiper deleted the patch-1 branch September 3, 2025 16:16
rajashish pushed a commit to rajashish/ingress2gateway1 that referenced this pull request Feb 21, 2026
* Add OIDC authentication support

* move blank import to main

* import all auth providers
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. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Error: failed to create client: no Auth Provider found for name "oidc"

4 participants