Skip to content

docs: update 2024-08-21 blogs #447

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

Merged
merged 1 commit into from
Aug 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
99 changes: 99 additions & 0 deletions blog/2024-08-21-newsletter/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
---
slug: 2024-08-21-newsletter
title: KCL Newsletter (2024.08.07 - 2024.08.21)
authors:
name: KCL Team
title: KCL Team
tags: [KCL, Newsletter]
image: /img/biweekly-newsletter.png
---

![](/img/biweekly-newsletter.png)

[KCL](https://github.com/kcl-lang/kcl) is an open-source configuration and policy language hosted by the Cloud Native Computing Foundation (CNCF) as a Sandbox Project. Built on a foundation of constraints and functional programming principles, KCL enhances the process of writing complex configurations, particularly in cloud-native environments. By leveraging advanced programming language techniques, KCL promotes improved modularity, scalability, and stability in configuration management. It simplifies logic writing, offers easy-to-use automation APIs, and seamlessly integrates with existing systems.

This section will update the KCL language community's latest news, including features, website updates, and the latest community news, helping everyone better understand the KCL community!

**_KCL Website: [https://kcl-lang.io](https://kcl-lang.io)_**

## Special Thanks

- Thanks to @officialasishkumar for contributing the ability to add Git repository subdirectory dependencies to the KCL package management tool. 🙌
- Thanks to @Gmin2 for contributing to the module storage path feature in the KCL package management tool. 🙌
- Thanks to @liangyuanpeng for contributions to modules like karpenter, gateway-api, and the KCL OpenAPI tool. 🙌
- Thanks to @NishantBansal2003 and @varshith257 for their research and contributions on third-party dependency checksum checks in the KCL package management tool. 🙌
- Thanks to @Harsh4902, @Gmin2, @shishir-11, @RehanChalana for their research and contributions to the Intellij IDE KCL LSP plugin. 🙌
- Thanks to @Vishalk91-4 for their ongoing contributions to the KCL tree-sitter grammar. 🙌
- Thanks to @dennybaa for contributions to modules like crossplane and crossplane-vault-provider. 🙌
- Thanks to @Manoramsharma for contributions to dependency alias features, ignoring TLS checks, and external Git dependencies in the KCL package management tool. 🙌
- Thanks to @DavidChevallier for contributions to modules like cilium and external-secrets. 🙌
- Thanks to @suin for contributions to the outdent module. 🙌
- Thanks to @Lukáš Kubín, @ChrisK, @Sergey Ryabin, @Lan Liang, @Endre Karlson, @suin, @Zack Zhang, @v3xro, @soubinan, @juanzolotoochin, @mnacharov, @dennybaa, @ron1, @DavidChevallier, @wmcnamee-coreweave, @vfarcic, @phisco, @juanzolotoochin, @juanique, @zackzhangverkada, @warmuuh and @novohool for their valuable suggestions and feedback during their use of KCL over the past two weeks. 🙌

## Overview

**🏄 Language Updates**

- Optimized the type inference and checks for function parameter calls/return value Dict to Schema, allowing the Schema name to be omitted to simplify configuration writing.
- Enhanced type checks for configuration merging operators, enabling the detection of more type errors at compile time.
- Supported omitting default values for Schema properties with singleton literal constant types.

Before optimization:

```python
schema Deployment:
apiVersion: "apps/v1" = "apps/v1"
```

After optimization:

```python
schema Deployment:
apiVersion: "apps/v1" # The type value is the same as the default value, so the default value can be omitted.
```

**📦️ Module Updates**

- `k8s` updated to 1.31
- `gateway-api` updated to 0.2.0
- `karpenter` updated to 0.2.0
- `crossplane` updated to 1.16.0
- `cilium` updated to 0.3.0
- `external-secrets` updated to 0.1.2
- New modules
- `crossplane-provider-vault` 1.0.0
- `outdent` 0.1.0
- `kcl_lib` 0.1.0

**📬️ Tool Updates**

- The `kcl import` tool now supports importing entire Go Packages and converting all Go struct definitions into KCL Schema definitions.
- The `kcl import` tool has added support for importing JSON Schemas containing AllOf validation fields as KCL Schema.
- The `kcl fmt` tool now preserves the user's blank lines between multiple code snippets, rather than deleting them all.
- Fixed the incorrect formatting position of the Schema index signature comments in the `kcl fmt` tool.
- Fixed unexpected errors when setting the -o parameter during the `kcl import` tool for Kubernetes CRDs.
- Fixed unexpected KCL Schema errors when importing empty Go structs with the `kcl import` tool.

**💻 IDE Updates**

- Supports workspace segmentation in the IDE using a `kcl.work` configuration file.
- Fixed the issue where schema example parameters could not display semantic information.

**⛵️ API Updates**

- Complete testing and case updates for the Kotlin API, see [https://www.kcl-lang.io/docs/reference/xlang-api/kotlin-api](https://www.kcl-lang.io/docs/reference/xlang-api/kotlin-api).
- Preliminary version of the Lua API released; contributions are welcome, see [https://github.com/kcl-lang/lib/tree/main/lua](https://github.com/kcl-lang/lib/tree/main/lua).

**🔥 Integration Updates**

- Flux KCL Controller released v0.4.0, aligning most Flux Kustomize Controller features to meet the demand for direct use of KCL instead of Kustomize for Flux GitOps.
- KRM KCL specification released v0.10.0 beta, adding features for pulling from private Git repositories and ignoring TLS checks.
- KCL Nix Package released v0.9.8.
- Crossplane KCL Function released v0.9.4; see details at [https://github.com/crossplane-contrib/function-kcl](https://github.com/crossplane-contrib/function-kcl).
- KCL Bazel Rules updated to KCL v0.10.0 beta; see details at [https://github.com/kcl-lang/rules_kcl](https://github.com/kcl-lang/rules_kcl).

## Resources

❤️ See [here](https://github.com/kcl-lang/community) to join us!

For more resources, please refer to the [KCL Website](https://kcl-lang.io/).
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
---
slug: 2024-08-21-newsletter
title: KCL 最新动态速递 (2024.08.07 - 2024.08.21)
authors:
name: KCL 团队
title: KCL 团队
tags: [KCL, Newsletter]
image: /img/biweekly-newsletter.png
---

![](/img/biweekly-newsletter-zh.png)

[KCL](https://github.com/kcl-lang) 是一个 CNCF 基金会托管的基于约束的记录及函数语言,期望通过成熟的编程语言技术和实践来改进对大量繁杂配置比如云原生 Kubernetes 配置场景的编写,致力于构建围绕配置的更好的模块化、扩展性和稳定性,更简单的逻辑编写,以及更简单的自动化和生态工具集成。

本栏目将会双周更新 KCL 语言社区最新动态,包括功能、官网更新和最新的社区动态等,帮助大家更好地了解 KCL 社区!

**_KCL 官网:[https://kcl-lang.io](https://kcl-lang.io)_**

## 特别鸣谢

感谢过去两周所有的社区参与者,以下排名不分先后

- 感谢 @officialasishkumar 对 KCL 包管理工具添加 Git 仓库子目录依赖能力的贡献 🙌
- 感谢 @Gmin2 对 KCL 包管理工具模块存放路径特性的贡献 🙌
- 感谢 @liangyuanpeng 对 karpenter, gateway-api 等模块以及 KCL OpenAPI 工具的贡献 🙌
- 感谢 @NishantBansal2003, @varshith257 对 KCL 包管理工具三方依赖 checksum 检查的调研和贡献。🙌
- 感谢 @Harsh4902, @Gmin2, @shishir-11, @RehanChalana 对 Intellij IDE KCL LSP 插件的调研和贡献。🙌
- 感谢 @Vishalk91-4 对 KCL tree-sitter 语法的持续贡献。🙌
- 感谢 @dennybaa 对 crossplane, crossplane-vault-provider 等模块的贡献 🙌
- 感谢 @Manoramsharma 对 KCL 包管理工具依赖别名特性,忽略 TLS 检查和外部 Git 依赖功能的贡献。🙌
- 感谢 @DavidChevallier 对 cilium, external-secrets 等模块的贡献 🙌
- 感谢 @suin 对 outdent 模块的贡献 🙌
- 感谢 @Lukáš Kubín, @ChrisK, @Sergey Ryabin, @Lan Liang, @Endre Karlson, @suin, @Zack Zhang, @v3xro, @soubinan, @juanzolotoochin, @mnacharov, @dennybaa, @ron1, @DavidChevallier, @wmcnamee-coreweave, @vfarcic, @phisco, @juanzolotoochin, @juanique, @zackzhangverkada, @warmuuh 和 @novohool 等在近两周使用 KCL 过程中提供的宝贵建议与反馈 🙌

## 内容概述

**🏄 语言更新**

- 优化函数参数调用/返回值 Dict 转 Schema 类型推导和检查,可以省略 Schema 名称简化配置书写
- 优化配置合并运算符的类型检查,可以在编译时发现更多类型错误
- 对类型为单子面值常量 Schema 属性支持省略默认值

优化前

```python
schema Deployment:
apiVersion: "apps/v1" = "apps/v1"
```

优化后

```python
schema Deployment:
apiVersion: "apps/v1" # 类型值与默认值相同,可以省略默认值
```

**📦️ 模块更新**

- `k8s` 更新至 1.31
- `gateway-api` 更新至 0.2.0
- `karpenter` 更新至 0.2.0
- `crossplane` 更新至 1.16.0
- `cilium` 更新至 0.3.0
- `external-secrets` 更新至 0.1.2
- 新增模型列表
- `crossplane-provider-vault` 1.0.0
- `outdent` 0.1.0
- `kcl_lib` 0.1.0

**📬️ 工具更新**

- `kcl import` 工具支持导入整个 Go Package 并将其中所有的 Go 结构体定义转换为 KCL Schema 定义
- `kcl import` 工具新增对包含 AllOf 验证字段的 JSON Schema 格式导入为 KCL Schema 的支持
- `kcl fmt` 工具支持保留用户在多个代码片段之间的空行,不会全部删除
- 修复 `kcl fmt` 工具对 Schema 索引签名注释错误的格式化位置
- 修复 `kcl import` 导入 Kubernetes CRD 时设置 -o 参数非预期的报错
- 修复 `kcl import` 导入空 Go 结构体输出非预期的 KCL Schema 错误

**💻 IDE 更新**

- 支持使用 `kcl.work` 配置文件划分 IDE 工作空间
- 修复 Schema 示例化参数无法显示语义信息的问题

**⛵️ API 更新**

- Kotlin API 完整测试和用例更新,详见 [https://www.kcl-lang.io/docs/reference/xlang-api/kotlin-api](https://www.kcl-lang.io/docs/reference/xlang-api/kotlin-api)
- Lua API 产出初步版本,欢迎贡献,详见 [https://github.com/kcl-lang/lib/tree/main/lua](https://github.com/kcl-lang/lib/tree/main/lua)

**🔥 社区集成更新**

- Flux KCL Controller 发布 v0.4.0 版本,对齐绝大部份 Flux Kustomize Controller 功能,满足直接使用 KCL 代替 Kustomize 作 Flux GitOps 的需求
- KRM KCL 规范发布 v0.10.0 beta 版本,新增私有 Git 仓库拉取和忽略 TLS 检查等功能
- KCL Nix Package 发布 v0.9.8 版本
- Crossplane KCL Function 发布 v0.9.4 版本,具体内容详见 [https://github.com/crossplane-contrib/function-kcl](https://github.com/crossplane-contrib/function-kcl)
- KCL Bazel Rules 更新 KCL v0.10.0 beta 版本,具体内容详见 [https://github.com/kcl-lang/rules_kcl](https://github.com/kcl-lang/rules_kcl)

## 其他资源

❤️ 查看 _[KCL 社区](https://github.com/kcl-lang/community)_ 加入我们。

更多其他资源请参考:

- [KCL 网站](https://kcl-lang.io/)
- [KusionStack 网站](https://kusionstack.io/)
Loading