Skip to content

Conversation

@Jeansen
Copy link
Contributor

@Jeansen Jeansen commented Jul 25, 2025

Similar to https://github.com/yaml/libyaml, this PR adds a flag BUILD_SHARED_LIBS to build a statically linked library of kubernetes-client.

@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Jul 25, 2025

CLA Signed

The committers listed above are authorized under a signed CLA.

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: Jeansen
Once this PR has been reviewed and has the lgtm label, please assign brendandburns for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found 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 cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. label Jul 25, 2025
@k8s-ci-robot
Copy link
Contributor

Welcome @Jeansen!

It looks like this is your first PR to kubernetes-client/c 🎉. 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-client/c 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 size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. and removed cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. labels Jul 25, 2025
@k8s-ci-robot k8s-ci-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Jul 25, 2025
@ityuhui
Copy link
Member

ityuhui commented Jul 26, 2025

Hello @Jeansen

Can you set shared compile by default ?

Change -DBUILD_SHARED_LIBS to -DBUILD_STATIC_LIBS

@ityuhui
Copy link
Member

ityuhui commented Jul 26, 2025

cmake -DCMAKE_INSTALL_PREFIX=/usr/local -DBUILD_SHARED_LIBS=ON ..
# If you don't want to build a shared but a static library:
cmake -DCMAKE_INSTALL_PREFIX=/usr/local -DBUILD_TESTING=OFF -DBUILD_SHARED_LIBS=OFF ..

Copy link
Member

Choose a reason for hiding this comment

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

What's the purpse of "-DBUILD_TESTING=OFF" ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh..that was a mistake. No purpose ... copy / paste error.

@Jeansen
Copy link
Contributor Author

Jeansen commented Jul 26, 2025

@Jeansen
Copy link
Contributor Author

Jeansen commented Jul 26, 2025

OpenAPITools/openapi-generator#21635

And I followed your suggestion to change -DBUILD_SHARED_LIBS to -DBUILD_STATIC_LIBS.

I admit, it was late and I overlooked some details. Thank you for the review!

Since this PR will be then in OpenAPITools, I'll close this one.

@Jeansen Jeansen closed this Jul 26, 2025
@Jeansen
Copy link
Contributor Author

Jeansen commented Jul 30, 2025

@ityuhui My changes have been merged in openapi-generator and will be included in the upcoming release. Please drop me a line when this release is part of this project. I'd be happy to update the docs in this repo to reflect the new changes.

@ityuhui
Copy link
Member

ityuhui commented Jul 31, 2025

Sure. I think @brendandburns is regenerating the client to include all recent CRs from openapi-generator.
After that, I'll request you to submit your CR for documentation.
Thanks for your contribution!

@ityuhui
Copy link
Member

ityuhui commented Aug 2, 2025

Hi @Jeansen

The latest changes from openapi-generator have been merged here.
You can now open your pull request for the documentation.

@Jeansen
Copy link
Contributor Author

Jeansen commented Aug 2, 2025

Done ;-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. 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.

3 participants