Skip to content

Commit

Permalink
feat: add more content
Browse files Browse the repository at this point in the history
Signed-off-by: zongz <[email protected]>
  • Loading branch information
zong-zhe committed Nov 30, 2023
1 parent 4e7bc55 commit 1529e9b
Showing 1 changed file with 98 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,84 @@ test_kubernetesRender = lambda {

新增 update 命令用于自动更新本地依赖,kcl mod update 将会为您自动下载本地缺失的三方库。具体参考: https://github.com/kcl-lang/kpm/pull/212

### KCL 导入工具发布

支持从 YAML/JSON/CRD/Terraform Schema 一键生成 KCL 配置/模型,实现自动化迁移。

如果您有如下 yaml 文件:
```
apiVersion: apps/v1
kind: Deployment
metadata:
name: nginx-deployment
labels:
app: nginx
spec:
replicas: 3
selector:
matchLabels:
app: nginx
template:
metadata:
labels:
app: nginx
spec:
containers:
- name: nginx
image: nginx:1.14.2
ports:
- containerPort: 80
```

通过命令 kcl import test.yaml 您可以将其转换为 KCL 程序。

```
"""
This file was generated by the KCL auto-gen tool. DO NOT EDIT.
Editing this file might prove futile when you re-run the KCL auto-gen generate command.
"""
apiVersion = "apps/v1"
kind = "Deployment"
metadata = {
name = "nginx-deployment"
labels = {
app = "nginx"
}
}
spec = {
replicas = 3
selector = {
matchLabels = {
app = "nginx"
}
}
template = {
metadata = {
labels = {
app = "nginx"
}
}
spec = {
containers = [
{
name = "nginx"
image = "nginx:1.14.2"
ports = [
{
containerPort = 80
}
]
}
]
}
}
}
```


更多详细内容请参考[一键从 Kubernetes 生态迁移到 KCL](https://kcl-lang.io/docs/user_docs/guides/working-with-k8s/adopt-from-kubernetes)

## 社区集成 & 扩展更新

### KCL 三方库市场 artifacthub.io
Expand All @@ -170,6 +248,10 @@ test_kubernetesRender = lambda {

![install-pkg](/img/blog/2023-11-30-kcl-0.7.0-release/install-pkg.png)

欢迎大家来 artifacthub.io 为 KCL 社区贡献您的三方库,让 KCL 社区变得更加丰富多彩!

贡献指南:https://kcl-lang.io/docs/user_docs/guides/working-with-k8s/publish-modules/

## 其他更新

完整更新和错误修复列表详见: https://github.com/kcl-lang/kcl/compare/v0.6.0...v0.7.0
Expand All @@ -180,8 +262,22 @@ KCL 网站 新增 KCL v0.7.0 文档内容并支持版本化语义选项,目前

## 社区动态

- 感谢 @XiaoK29 对 IDE 悬停功能体验提升的贡献 🙌
- 感谢 @jakezhu9 对编译器单元测试,benchmark 的贡献 🙌
### KCL 正式成为 CNCF 沙箱项目

🎉 🎉 🎉 2023 年 9 月 20 日,KCL 项目通过了全球顶级开源基金会云原生计算基金会(CNCF)技术监督委员会评定,正式成为 CNCF 沙箱项目。

更多详情 - https://kcl-lang.io/blog/2023-09-19-kcl-joining-cncf-sandbox/

### 感谢社区的小伙伴的贡献
- 感谢 @jakezhu9 对 KCL Import 工具 Terraform Schema 到 KCL Schema 转换的贡献 🙌 _[https://github.com/kcl-lang/kcl-go/pull/152](https://github.com/kcl-lang/kcl-go/pull/152)_
- 感谢 @jakezhu9 对 kpm 集成 Import 工具的贡献 🙌 _[https://github.com/kcl-lang/kpm/pull/194](https://github.com/kcl-lang/kpm/pull/194)_
- 感谢 @zwpaper 对 KCL 文档和 Tree Sitter Grammar 做出的贡献 🙌 _[https://github.com/kcl-lang/tree-sitter-kcl/pull/1](https://github.com/kcl-lang/tree-sitter-kcl/pull/1)_
- 感谢 @jakezhu9 对 KCL 语法解析单元测试的改进,将部分测试用例统一迁移到使用 snaptest 框架 🙌 _[https://github.com/kcl-lang/kcl/pull/794](https://github.com/kcl-lang/kcl/pull/794)_
- 感谢 @opsnull 对 KCL 官网文档中代码示例的纠错和贡献 🙌 _[https://github.com/kcl-lang/kcl-lang.io/pull/182](https://github.com/kcl-lang/kcl-lang.io/pull/182)_
- 感谢 @prahaladramji 对 KCL IntelliJ 插件格式化功能的纠错和优化 🙌 _[https://github.com/kcl-lang/intellij-kcl/pull/15](https://github.com/kcl-lang/intellij-kcl/pull/15)_
- 感谢 @jakezhu9 对 KCL benchmark 由单线程 Rc 到 Arc 的改进,对 KCL 导入工具中关于引用路径的 bug修复 🙌 _[https://github.com/kcl-lang/kcl-go/pull/170](https://github.com/kcl-lang/kcl-go/pull/170)_
- 感谢 @liangyuanpeng 为 KCL 模型贡献 karmada 模型包,欢迎!🙌 _[https://github.com/kcl-lang/artifacthub/pull/48/files](https://github.com/kcl-lang/artifacthub/pull/48/files)_
- 感谢 @mrgleeco, @ghpu, @steeling, @prahaladramji, @zwpaper 等在使用 KCL 及工具链过程中提出的宝贵反馈和讨论 🙌

## 下一步计划

Expand Down

0 comments on commit 1529e9b

Please sign in to comment.