Support KRM in Kustomize plugin - TemplateTransformer
Intro
Kustomize (the official tool to create K8s IaC) adopted the new Kubernetes declarative configurations known as KRM Functions. The new style is used as a unified way to interact with Kustomize plugins. There are 2 ways to use KRM in the plugins: Containerized KRM Functions and Exec KRM functions.
Not all Kustomize plugins adopted the new format; hence the goal of this task is to support the new method in existing plugins, namely, TemplateTransformer.
Acquired Skills
By doing this task, you will gain the following skills:
- Golang coding skills.
- Kustomize plugin ecosystem.
- Unerstanding of Kubernetes Resource Model (KRM).
The Challange
Support KRM in [TemplateTransformer](https://github.com/joshdk/template-transformer Kustomize plugin.
The Task
- [ ] Create an issue in TemplateTransformer to propose supporting KRM.
- [ ] Fork the TemplateTransformer repo and create a new branch to work on the task.
- [ ] Create a PR in the forked repo and assign me (@aabouzaid) as a reviewer.
Notes and Tips
- Get into KRM: Kustomize Enhancement with KRM Functions
- There are 2 libs to support KRM, kpt-functions-sdk/go/fn from Google and another kyaml/fn/framework from the Kustomize project. Please use the one from Kustomize. It makes it easy to write KRM functions.
- A good example of using
kyaml/fn/framework(the one from Kustomize) is kustomize-kubeconformvalidator.
Related Links
- TBA
@aabouzaid I will handle it
@aabouzaid Thank you for creating this task. I am happy to take this issue.
I am still understanding what KRM functions mean but I see it is still in alpha phase and there has not been much progress on developing this feature further for quite some time now. So does it still make sense to open an issue on the repo to implement KRM functions?
I have a good idea of what KRM functions are by reading these blog posts:
- https://github.com/treyd-io/blog-kustomize-krm-function-demo
- https://medium.com/@michael.vittrup.larsen/replacing-helm-and-kustomize-with-krm-functions-a-new-approach-to-configuration-management-676212cc1332
- https://www.innoq.com/en/blog/2023/03/kustomize-enhancement-with-krm-functions/
I am facing problems running this plugin on mac. There is even an open issue on this as well: https://github.com/joshdk/template-transformer/issues/25
I just got it working on mac. I mentioned the steps in the issue. Maybe I will open another PR to enhance the readme, so it's clear for other people on mac.