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

[Enhancement] Consider adding resource matching rules to the KRM-KCL Spec #13

Closed
Peefy opened this issue Aug 14, 2023 · 5 comments · Fixed by #54
Closed

[Enhancement] Consider adding resource matching rules to the KRM-KCL Spec #13

Peefy opened this issue Aug 14, 2023 · 5 comments · Fixed by #54
Assignees
Labels
good first issue Good for newcomers help wanted Extra attention is needed

Comments

@Peefy
Copy link
Contributor

Peefy commented Aug 14, 2023

Background

In the current version of the KRM KCL specification, users need to repeatedly write and filter certain types of resource codes such as service and deployments, and consider adding resource filtering declarations to further reduce the required code volume, such as the following form.

resourceRules:
 - apiGroups:   ["apps"]
   apiVersions: ["v1"]
   resources:   ["deployments"]

Reference

@Peefy Peefy added good first issue Good for newcomers help wanted Extra attention is needed labels Jan 23, 2024
@satyazzz123
Copy link
Contributor

Hello @Peefy can I work on this issue?

@satyazzz123
Copy link
Contributor

Hello @Peefy I had a question

In the current version of the KRM KCL specification, users need to repeatedly write and filter certain types of resource codes such as service and deployments

How do we currently write deployments and services inside KCL , can I see some examples of where there is a typical usage of resource code for deployments and services

@Peefy
Copy link
Contributor Author

Peefy commented Jan 24, 2024

Hello @Peefy I had a question

In the current version of the KRM KCL specification, users need to repeatedly write and filter certain types of resource codes such as service and deployments

How do we currently write deployments and services inside KCL , can I see some examples of where there is a typical usage of resource code for deployments and services

Here's documents https://kcl-lang.io/docs/user_docs/guides/working-with-k8s/overview

In fact, what this issue wants to do is to filter these fields through configuration when there is a series of resource inputs on the resource transformer. https://github.com/kcl-lang/krm-kcl/blob/main/pkg/edit/transformer.go#L38

Expanding it based on existing transformer interfaces is a better way.

@shruti2522
Copy link
Contributor

Would be happy to take this one, @Peefy

@Peefy
Copy link
Contributor Author

Peefy commented Apr 30, 2024

Thank you! @shruti2522

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants