KCL is an open-source, constraint-based record and functional language that enhances the writing of complex configurations, including those for cloud-native scenarios. With its advanced programming language technology and practices, KCL is dedicated to promoting better modularity, scalability, and stability for configurations. It enables simpler logic writing and offers ease of automation APIs and integration with homegrown systems.
This section will update the KCL language community's latest developments every two weeks, including features, website updates, and the latest community news, helping everyone better understand the KCL community!
KCL Website: https://kcl-lang.io
Thank you to all contributors for their outstanding work over the past two weeks (09.07 - 10.11 2023). Here is an overview of the key content:
🔧 Language and Toolchain Updates
- KCL v0.6.0 Release on 9/15 - Updates to the language, toolchain, and community integration. Detailed information could be found here.
- KCL IDE Updates - Supports for hover tooltips on standard library and built-in functions, and quick fixes for KCL code errors. And a plugin compatible with Intellij IDEA 2023.2 is released.
- KCL Package Management Tool KPM Updates -
kpm runnow could compile KCL files and embeded with the import tool.
- KCL Documentation Tool Updates - The docstring Examples section is added to the output documentation.
- KCL Language Updates - Optimized error message output and added suggestions for fixing some errors.
📰 Official Website and Use Case Updates
- KCL website adds v0.6.0 documentation version.
- More KCL model examples for containers, services, and Pod Security Policy (PSP): https://github.com/kcl-lang/krm-kcl/tree/main/examples
The following are listed in no particular order:
- Thanks to @jakezhu9 for contributing the KCL Import tool to convert Terraform Schema to KCL Schema 🙌 https://github.com/kcl-lang/kcl-go/pull/152
- Thanks to @jakezhu9 for contributing the integration of the Import tool to kpm 🙌 https://github.com/kcl-lang/kpm/pull/194
- Thanks to @zwpaper for contributions to KCL documentation and Tree Sitter Grammar 🙌 https://github.com/kcl-lang/tree-sitter-kcl/pull/1, etc.
- Thanks to @mrgleeco, @ghpu, @steeling, @prahaladramji, @zwpaper, and others for valuable feedback and discussions while using KCL and the toolchain 🙌
IDE Extension Updates
In the recent v0.6.0 release, the KCL IDE plugin has enhanced on hover tooltips for the standard library and builtin functions, along with support for quick fixes for KCL code errors. Additionally, end-to-end tests for the language server and integration tests for the konfig repository have been added to ensure the stability and iteration of the IDE plugin. In the upcoming release, a new
kcl-language-server version subcommand has been added to display version information. Please refer to https://kcl-lang.io/docs/user_docs/getting-started/install/#2-install-kcl-ide-extension for instructions on how to upgrade and install the KCL IDE extension in various IDE platforms.
Besides, the IntelliJ plugin is now compatible with version 2023.2+ and can be downloaded from the following link: https://github.com/kcl-lang/intellij-kcl/releases
KCL Package Manager Updates
The kpm run command now supports compiling KCL files and has integrated an import tool. Additionally, the
--quiet option has been added to suppress output logs.
KCL Language Updates
In the upcoming release, the KCL compilation command has optimized error message output and added repair suggestions on some cases:
KCL Models Updates
In the past few weeks, we have provided more usage examples for configuring and validating containers, services, and Pod Security Policy (PSP).
You can refer to the corresponding examples to incorporate the above configurations and validations: https://github.com/kcl-lang/krm-kcl/tree/main/examples. Now, let's explain using the Kubectl KCL plugin and the disallow-svc-lb model. The purpose of disallow-svc-lb is to validate Service resources and disallow the use of LoadBalancer as the Service type. Write the following YAML file (manifests.yaml):
A validation that prevents the creation of Service resources of type `LoadBalancer`
- name: http
type: LoadBalancer # The service type is incorrectly set to LoadBalancer.
Using the Kubectl KCL tool for resource validation on the client-side, we will get the following result:
kubectl kcl apply -f manifests.yaml
The output is
A validation that prevents the creation of Service resources of type `LoadBalancer`, for Service: my-service
❤️ Thanks to all KCL users and community members for their valuable feedback and suggestions in the community.
For more resources, please refer to