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

[Feature Request] Support functions written by KCL and its SDKs for KPT #3671

Open
Peefy opened this issue Nov 22, 2022 · 12 comments
Open

[Feature Request] Support functions written by KCL and its SDKs for KPT #3671

Peefy opened this issue Nov 22, 2022 · 12 comments
Assignees
Labels
area/fn-sdk Typescript SDK enhancement New feature or request triaged Issue has been triaged by adding an `area/` label

Comments

@Peefy
Copy link

Peefy commented Nov 22, 2022

Describe your problem

Please describe your problem and specific use case, providing as much context as
possible. As a general rule, it is more effective to focus on describing the
problem instead of asking for a specific solution. This ensures the
following:

  1. We understand WHY you are asking for this.

I was very glad to find the KPT project and browse all its documents. I found that it coincided with what we wanted to do.

Specifically, we have just opened our domain language project KCL, which is specifically used for configuration writing and policy verification in cloud-native and kubernetes scenarios. However, it is obviously not enough to use only one language for kubernetes configuration management until we find KPT. We want to develop KCL plug-ins and SDKs for KPT to write KPT functions, so we want to keep in touch with you through this issue. Because I am new to KPT, I want to know where I can get help documents if I want to develop a new language SDK for KPT.

  1. We can pattern match across multiple users with this problem.
  2. Allow design freedom for addressing the problem given various trade-offs and
    UX considerations.
@Peefy Peefy added the enhancement New feature or request label Nov 22, 2022
@mortent mortent added area/site area/fn-sdk Typescript SDK and removed area/site labels Jan 26, 2023
@droot
Copy link
Contributor

droot commented Jan 26, 2023

Thanks for reaching out @Peefy

At the moment, we do not have documentation for writing a new language SDK for kpt. But you can take a look at our docs for Developing Functons and see the docs for the three SDK (Go, Typescript, Starlark) to get an idea how function authors use the SDKs. Hopefully that should get you started.

@droot droot added the triaged Issue has been triaged by adding an `area/` label label Jan 26, 2023
@Peefy
Copy link
Author

Peefy commented Jan 27, 2023

Thanks for reaching out @Peefy

At the moment, we do not have documentation for writing a new language SDK for kpt. But you can take a look at our docs for Developing Functons and see the docs for the three SDK (Go, Typescript, Starlark) to get an idea how function authors use the SDKs. Hopefully that should get you started.

Are there plans to support other languages? I will follow kpt for a long time. 😄😄

@droot
Copy link
Contributor

droot commented Jan 30, 2023

Are there plans to support other languages?

Not at the moment. we are stretched thin even to support the three we do currently. So contributors are welcome :)

@Peefy
Copy link
Author

Peefy commented Jan 30, 2023

Are there plans to support other languages?

Not at the moment. we are stretched thin even to support the three we do currently. So contributors are welcome :)

Of course, I am very willing to contribute and participate in the kpt project. If I can, I will continue to pay attention to kpt and browse all documents and codes and give my design.

@droot
Copy link
Contributor

droot commented Jan 30, 2023

Are there plans to support other languages?

Not at the moment. we are stretched thin even to support the three we do currently. So contributors are welcome :)

Of course, I am very willing to contribute and participate in the kpt project. If I can, I will continue to pay attention to kpt and browse all documents and codes and give my design.

Great to hear!

@Peefy
Copy link
Author

Peefy commented Mar 17, 2023

@droot Hi, I'm sorry for waiting so long. I have preliminarily designed the KPT KCL SDK in the KCL repo, and I am pleased to receive your feedback. kcl-lang/kcl#434

@Peefy
Copy link
Author

Peefy commented Mar 22, 2023

@droot Hi, I'm sorry for waiting so long. I have preliminarily designed the KPT KCL SDK in the KCL repo, and I am pleased to receive your feedback. KusionStack/KCLVM#434

Here is a one-line KCL transformer.

# kcl-fn-config.yaml
apiVersion: fn.kpt.dev/v1alpha1
kind: KCLRun
metadata:
  name: set-annotation
source: |
   # One line KCL transformer.
   [item | {metadata.annotations: {"managed-by" = "kcl-kpt"}} for item in option("resource_list").items]

@Peefy
Copy link
Author

Peefy commented Mar 23, 2023

Hello. I have completed the initial version of the kpt KCL function, and I hope you can give some suggestions. If possible, I am willing to contribute to the KPT community.

@natasha41575
Copy link
Contributor

@yuwenma assigning to you as the area lead of function sdk

@yuwenma
Copy link
Contributor

yuwenma commented Mar 23, 2023

added @droot who initiates the discussions with Peefy.

@Peefy
Copy link
Author

Peefy commented Jun 14, 2023

Hi @droot. Long time no contact. I am excited to report on the progress to you. and we have completed the KPT KCL Function PoC and expected to contribute to the community, there is no additional demand for kpt fn.

@droot
Copy link
Contributor

droot commented Jun 14, 2023

Sorry @Peefy for not responding earlier. I plan to review it next week. Will share the feedback then. Thanks for the update.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/fn-sdk Typescript SDK enhancement New feature or request triaged Issue has been triaged by adding an `area/` label
Projects
None yet
Development

No branches or pull requests

5 participants