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

Refactor LibKubernetesGenerator code structure #1546

Merged
merged 5 commits into from
Apr 15, 2024

Conversation

tg123
Copy link
Member

@tg123 tg123 commented Apr 10, 2024

This pull request refactors the code structure of the LibKubernetesGenerator project.

Why

the old template Nustache is inactive and did not recieve any update in last 5 yr.

The syntax of Nustache is not friendly to developers:

  • no else
  • hard to define customize func
  • lack of built in utils

New Template Engine

https://github.com/scriban/scriban/

The scriban templating engine was chosen over other options due to its unique features that make it suitable for code generation. One of these features is the embed mode, which is specifically designed for this purpose.

Furthermore, scriban offers a rich syntax that meets the requirements of the current SDK build. This means it provides a wide range of functionalities that can handle complex templating tasks, making it an excellent choice for this use case.

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Apr 10, 2024
@codecov-commenter
Copy link

codecov-commenter commented Apr 10, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

❗ No coverage uploaded for pull request base (master@6bdc210). Click here to learn what that means.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff            @@
##             master    #1546   +/-   ##
=========================================
  Coverage          ?   61.46%           
=========================================
  Files             ?      103           
  Lines             ?     3065           
  Branches          ?      637           
=========================================
  Hits              ?     1884           
  Misses            ?     1181           
  Partials          ?        0           

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

@brendandburns
Copy link
Contributor

/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Apr 15, 2024
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: brendandburns, tg123

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

The pull request process is described here

Needs approval from an approver in each of these files:
  • OWNERS [brendandburns,tg123]

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 merged commit 3dae1cf into kubernetes-client:master Apr 15, 2024
14 checks passed
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. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants