- 快召唤伙伴们来围观吧
- 微博 QQ QQ空间 贴吧
- 文档嵌入链接
- 复制
- 微信扫一扫分享
- 已成功复制到剪贴板
一种用于大规模配置和策略管理的声明式编程语言
展开查看详情
1 .KCL: A Declarative Language for Large-scale Configuration and Policy Management KCL 配置策略语言 徐鹏飞(Peefy) Ant Group Mar. 2023
2 . 01 Background 02 Design Agenda 03 Scenarios 04 Evaluation
3 .Background 01
4 .About Me • 徐鹏飞(Peefy) • https://github.com/Peefy • KCL Maintainer • Repo: https://github.com/KusionStack/KCLVM • Website: https://kcl-lang.io/
5 .Why KCL • Hide infrastructure and platform details to reduce the burden of developers. • Abstraction • Solve issues on YAML/Template bloat • Language enhancement: logic, type, function and package. • Large-scale configuration management without side effects cross teams. • Stability • Scalability • Automation • High performance • Package distribute and sharing • Enhancement for configuration tools e.g., Helm, Kustomize. • Validating • Editing
6 .Design 02
7 .Overview Language + Tools + IDEs + SDKs + Plugins KCL Package Manager KCL Coding Assistant Highlight Format Go To Def/Ref Compile Completion Debug Error/Warning Test Checking LSP KCL Language Server KCL Compiler Tools & CI/CD Engagement kcl-format✅ kcl-lint ✅ kcl-test ✅ kcl-doc ✅ https://github.com/KusionStack/KCLVM
8 .Features
9 .Concepts KCL = Config + Schema + Rule + Lambda Config Definition Organize Describe Schema Lambda Validate Combinate Rule
10 .Concepts KCL = Config + Schema + Rule + Lambda Config Definition Organize Describe Schema Lambda Validate Combinate Rule
11 .Concepts KCL = Config + Schema + Rule + Lambda Config Definition Organize Describe Schema Lambda Validate Combinate Rule
12 .Concepts KCL = Config + Schema + Rule + Lambda Config Definition Organize Describe Schema Lambda Validate Combinate Rule
13 .Configuration Merge • base.k Equivalent code • prod.k
14 .Validation
15 .Automation
16 .Modules GPLs meta 100+ built-in functions, modules with additional KPM package manager tools and plugins
17 .Scenarios 03
18 .Integrations • Enhancement for configuration tools: Abstract, Generate, Validate, Edit • Easy schema migration, integration, distribution and usage • Glue of IaC/IaD through declarative configuration and policy language • Automation and GitOps Friendly
19 .Working with KusionStack Self-service application deployment tools and workflow for Kubernetes and Clouds Manage App from the first code to production-ready with KCL, Kusion and Konfig Orchestrate hybrid runtime resources such as Kubernetes, clouds and customized infrastructures in a unified way Write once, render dynamically, deliver to any cloud https://github.com/KusionStack/kusion
20 .Workflow
21 .Workspace Konfig App Ops App Deliver DB Ops Site Ops Sec Ops Base Model https://github.com/KusionStack/konfig
22 .Examples
23 .Evaluation 04
24 .Related Works Programmable Structured KV Templated KV Typed KV Modeled KV KV Pros. Pros. Pros. Pros. Pros. • Easy to write and read • Simple config logic support • Required programming features • Rich config constraint syntax • Model-centric & constraint-centric • Rich multi-language API • Dynamic argument input • Code modularity • Unified type & value constraint • Scalability on separated block • Various Path Tools • Templates & Data abstraction • Configuration conflict checking writing with rich merge strategies Cons. Cons. Cons. Cons. • Static type system & analysis • Redundant information • Increase of argument makes • Insufficient type constraints • Difficult to configuration • High Performance • Insufficient functionality e.g. it difficult to maintain • Insufficient restraint ability override for multi-environment Cons. abstraction, constraint, … • Insufficient functionality e.g. • Runtime error scenarios • Expansion of different models Tech. abstraction, constraint, … Tech. • Runtime checks and limited requires investment in R&D • JSON Tech. • GCL performance Tech. • YAML • Velocity • HCL Tech. • KCL Product • Go Template • JSONNET • CUE • … • Kustomize Product • … • … Product • … • Helm Product Product • KusionStack • … • Terraform • KubeVela • … • … • …
25 .Adopters and Partners
26 .Key Results at Ant Group 15 32 1500+ 100+ 500+ BG BU Projects Clusters Committers 1K/day 30K+ 100K+ ~1M 10K+/day KCL KCL Pipelines PRs Commits Codes Compilations
27 . Roadmap • v0.4.6 Release • v0.5.0 Release • v0.6.0 Release • v0.7.0 Release • Ease of Use and Error Improvement • Improvement of Grammar and Standard • KCL New UI Design • KCL New UI Release Libraries • Helm KCL Schema Plugin Design • Kustomize KRM KCL Plugin Design • Kustomize KRM KCL Plugin • KCL Abstract/Constraint Specification Release • KPT KCL SDK Deign Standards and Best Practices Manual • KCL KPM OCI Registry • KCL KPM S3/OSS • KCL KPM Pre-release (Git Repo, Lock, • Helm KCL Schema Plugin Release • KCL New Test Tool Release Dependency management) • CompilerBase Grammar and • KPT KCL SDK Release • CompilerBase Core Components Sematic • ConfVet Design • KCL KPM Release • More KCL IDE Support e.g., Vim • Go SDK: Better Installation, Go Struct/KCL Schema Conv API,List Instance API, etc. • KCL New Test Tool Design • KCL New IDE Plugin Pre-release • ConfVet Release Language • KCL Playground Code Share • More SDK Support e.g., Java, Node.js Tool • KCL New IDE Plugin Stable-release (Syntax SDK error recovery, semantic highlighting, semantic completion, etc.) Scene & Integration Technical Subproject • More KCL Playground Code Samples IDE Plugin 2023.4 2023.6 2023.9 2023.12 https://github.com/KusionStack/KCLVM/issues/29
28 .Resources • Website • https://kcl-lang.io/ • https://kusionstack.io/ • Repo • https://github.com/KusionStack/KCLVM 欢迎大家用钉钉扫码 • https://github.com/KusionStack/kusion 或钉钉搜索:42753001 • https://github.com/KusionStack/konfig 加入 KusionStack 官方交流群 • Community • https://github.com/KusionStack/community#contact • https://github.com/KusionStack/community • Twitter • @KusionStack 欢迎大家用微信扫码 加入 KusionStack 官方微信群
29 .