Skip to content

Commit 1529e9b

Browse files
committed
feat: add more content
Signed-off-by: zongz <zongzhe1024@163.com>
1 parent 4e7bc55 commit 1529e9b

File tree

1 file changed

+98
-2
lines changed
  • i18n/zh-CN/docusaurus-plugin-content-blog/2023-11-30-kcl-0.7.0-release

1 file changed

+98
-2
lines changed

i18n/zh-CN/docusaurus-plugin-content-blog/2023-11-30-kcl-0.7.0-release/index.md

Lines changed: 98 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,84 @@ test_kubernetesRender = lambda {
152152

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

155+
### KCL 导入工具发布
156+
157+
支持从 YAML/JSON/CRD/Terraform Schema 一键生成 KCL 配置/模型,实现自动化迁移。
158+
159+
如果您有如下 yaml 文件:
160+
```
161+
apiVersion: apps/v1
162+
kind: Deployment
163+
metadata:
164+
name: nginx-deployment
165+
labels:
166+
app: nginx
167+
spec:
168+
replicas: 3
169+
selector:
170+
matchLabels:
171+
app: nginx
172+
template:
173+
metadata:
174+
labels:
175+
app: nginx
176+
spec:
177+
containers:
178+
- name: nginx
179+
image: nginx:1.14.2
180+
ports:
181+
- containerPort: 80
182+
```
183+
184+
通过命令 kcl import test.yaml 您可以将其转换为 KCL 程序。
185+
186+
```
187+
"""
188+
This file was generated by the KCL auto-gen tool. DO NOT EDIT.
189+
Editing this file might prove futile when you re-run the KCL auto-gen generate command.
190+
"""
191+
192+
apiVersion = "apps/v1"
193+
kind = "Deployment"
194+
metadata = {
195+
name = "nginx-deployment"
196+
labels = {
197+
app = "nginx"
198+
}
199+
}
200+
spec = {
201+
replicas = 3
202+
selector = {
203+
matchLabels = {
204+
app = "nginx"
205+
}
206+
}
207+
template = {
208+
metadata = {
209+
labels = {
210+
app = "nginx"
211+
}
212+
}
213+
spec = {
214+
containers = [
215+
{
216+
name = "nginx"
217+
image = "nginx:1.14.2"
218+
ports = [
219+
{
220+
containerPort = 80
221+
}
222+
]
223+
}
224+
]
225+
}
226+
}
227+
}
228+
```
229+
230+
231+
更多详细内容请参考[一键从 Kubernetes 生态迁移到 KCL](https://kcl-lang.io/docs/user_docs/guides/working-with-k8s/adopt-from-kubernetes)
232+
155233
## 社区集成 & 扩展更新
156234

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

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

251+
欢迎大家来 artifacthub.io 为 KCL 社区贡献您的三方库,让 KCL 社区变得更加丰富多彩!
252+
253+
贡献指南:https://kcl-lang.io/docs/user_docs/guides/working-with-k8s/publish-modules/
254+
173255
## 其他更新
174256

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

181263
## 社区动态
182264

183-
- 感谢 @XiaoK29 对 IDE 悬停功能体验提升的贡献 🙌
184-
- 感谢 @jakezhu9 对编译器单元测试,benchmark 的贡献 🙌
265+
### KCL 正式成为 CNCF 沙箱项目
266+
267+
🎉 🎉 🎉 2023 年 9 月 20 日,KCL 项目通过了全球顶级开源基金会云原生计算基金会(CNCF)技术监督委员会评定,正式成为 CNCF 沙箱项目。
268+
269+
更多详情 - https://kcl-lang.io/blog/2023-09-19-kcl-joining-cncf-sandbox/
270+
271+
### 感谢社区的小伙伴的贡献
272+
- 感谢 @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)_
273+
- 感谢 @jakezhu9 对 kpm 集成 Import 工具的贡献 🙌 _[https://github.com/kcl-lang/kpm/pull/194](https://github.com/kcl-lang/kpm/pull/194)_
274+
- 感谢 @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)_
275+
- 感谢 @jakezhu9 对 KCL 语法解析单元测试的改进,将部分测试用例统一迁移到使用 snaptest 框架 🙌 _[https://github.com/kcl-lang/kcl/pull/794](https://github.com/kcl-lang/kcl/pull/794)_
276+
- 感谢 @opsnull 对 KCL 官网文档中代码示例的纠错和贡献 🙌 _[https://github.com/kcl-lang/kcl-lang.io/pull/182](https://github.com/kcl-lang/kcl-lang.io/pull/182)_
277+
- 感谢 @prahaladramji 对 KCL IntelliJ 插件格式化功能的纠错和优化 🙌 _[https://github.com/kcl-lang/intellij-kcl/pull/15](https://github.com/kcl-lang/intellij-kcl/pull/15)_
278+
- 感谢 @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)_
279+
- 感谢 @liangyuanpeng 为 KCL 模型贡献 karmada 模型包,欢迎!🙌 _[https://github.com/kcl-lang/artifacthub/pull/48/files](https://github.com/kcl-lang/artifacthub/pull/48/files)_
280+
- 感谢 @mrgleeco, @ghpu, @steeling, @prahaladramji, @zwpaper 等在使用 KCL 及工具链过程中提出的宝贵反馈和讨论 🙌
185281

186282
## 下一步计划
187283

0 commit comments

Comments
 (0)