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

Support loading a custom TLS server name from kubeconfig #270

Merged
merged 1 commit into from
Dec 30, 2023

Conversation

multani
Copy link
Contributor

@multani multani commented Aug 19, 2023

This honors the tls-server-name parameter which can be present in a kubeconfig configuration file.

The implementation is similar to the one done in kubernetes-client/python#1933

This needs a released version of aio-libs/aiohttp#7541 This is implemented in aiohttp v3.9.0.

Fix: #267

@multani multani changed the title Support TLS server name Support loading a custom TLS server name from kubeconfig Aug 19, 2023
@multani
Copy link
Contributor Author

multani commented Aug 21, 2023

@tomplus could you take a look at this pull request preemptively?

I'm still waiting for an official release of aiohttp containing aio-libs/aiohttp#7541 and until then, I'm not going to turn this pull request into an official one (the tests are not passing because of this).

But it would be nice to get a first overview on the general approach, in particular the patch post-client generation.

@tomplus
Copy link
Owner

tomplus commented Aug 22, 2023

@multani Thanks. It looks good to me. If you have time you can also create a PR to openapi-generator, it helps us to remove the patch in the feature (https://github.com/OpenAPITools/openapi-generator/blob/master/modules/openapi-generator/src/main/resources/python/asyncio/rest.mustache).

@multani
Copy link
Contributor Author

multani commented Aug 22, 2023

@tomplus Thanks, that was exactly the kind of feedback I was looking for :)

I'll make the pull request there as well then!

edit: it's there as a draft too: OpenAPITools/openapi-generator#16380

Copy link

codecov bot commented Dec 29, 2023

Codecov Report

Attention: 2 lines in your changes are missing coverage. Please review.

Comparison is base (8040241) 23.39% compared to head (5de47e8) 23.40%.

Files Patch % Lines
kubernetes_asyncio/client/rest.py 33.33% 2 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##           master     #270   +/-   ##
=======================================
  Coverage   23.39%   23.40%           
=======================================
  Files         749      749           
  Lines      104991   105004   +13     
=======================================
+ Hits        24564    24575   +11     
- Misses      80427    80429    +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@multani multani marked this pull request as ready for review December 29, 2023 19:37
@multani
Copy link
Contributor Author

multani commented Dec 29, 2023

The related patch for aiohttp has been released in v3.9.0: this patch also bumps the minimum version for this library.

Copy link
Owner

@tomplus tomplus left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for your contribution...

@tomplus tomplus merged commit 3346d59 into tomplus:master Dec 30, 2023
7 checks passed
@multani multani deleted the tls-server-name branch January 2, 2024 18:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Client doesn't honor tls-server-name setting in kubeconfig
2 participants