Skip to content

Conversation

@p172913
Copy link

@p172913 p172913 commented May 17, 2025

Summary

This pull request adds support for to read and use environment variables while using kubernetes client generated by open-api-generator

Validation

  • Ran ./mvnw clean package successfully.
    image
  • Created configuration.py used in kubernetes using modules/openapi-generator-cli/target/openapi-generator-cli.jar
    image

@p172913
Copy link
Author

p172913 commented May 17, 2025

@openapitools/generator-core-maintainers could you take a look at this?

@p172913
Copy link
Author

p172913 commented May 18, 2025

@canadaduane , @jqr , @wpiekutowski , @farcaller please take a look at my PR...

@wing328
Copy link
Member

wing328 commented May 18, 2025

please follow step 3 to update the samples

{{^defaultValue}}
self.{{name}} = None
{{/defaultValue}}
{{/cliOptions}}
Copy link
Member

Choose a reason for hiding this comment

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

can you explain this part about cliOptions?

Copy link
Author

Choose a reason for hiding this comment

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

This will assign variable with None value if we didn't provide any value to it...

@wing328
Copy link
Member

wing328 commented May 18, 2025

btw, you can use customized templates (e.g.-t via CLI) to customize the mustache templates updated by this PR

@wing328
Copy link
Member

wing328 commented May 18, 2025

just so we're on the same page, which version of openapi generator did kubernetes python client use to generate the client?

@p172913
Copy link
Author

p172913 commented May 18, 2025

As per change logs we are using v4.3.0
image

@wing328
Copy link
Member

wing328 commented May 18, 2025

the python client generator has been completely refactored in openapi generator v7.0.0 (to support only python 3.x) so i don't think the chnage you made here will propagate to the kubernetes python client repo.

still you can use customized templates with the changes you applied in this pr

@wing328 wing328 closed this Jul 3, 2025
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.

2 participants