Skip to content
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

feat: add workflow and new spec in README.md #4

Merged
merged 2 commits into from
Jan 31, 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
14 changes: 13 additions & 1 deletion README-zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,11 @@

kcl-controller 是一个组件,用于集成 [KCL](https://github.com/kcl-lang/kcl) 和 [Flux](https://github.com/fluxcd/flux2), 主要用来根据存储在 git/oci 仓库中的 KCL 程序定义的基础设施和工作负载,通过 [source-controller](https://github.com/fluxcd/source-controller) 获取 KCL 程序,实现基础设施和工作负载的持续交付。

![kcl-flux](./docs/img/kcl-flux.png)

# 特性

- 定期监控存储 KCL 程序的 git 仓库,并根据 git 仓库中的变化,调谐 k8s 集群状态。
- 定期监控存储 KCL 程序的 git/oci 仓库,并根据 git 仓库中的变化,调谐 k8s 集群状态。

# 快速开始

Expand Down Expand Up @@ -75,6 +77,16 @@ spec:
url: https://github.com/awesome-kusion/kcl-deployment.git
ref:
branch: main # 监控 main 分支
---
apiVersion: krm.kcl.dev.fluxcd/v1alpha1
kind: KCLRun
metadata:
name: kcl-git-controller
namespace: default
spec:
sourceRef:
kind: GitRepository
name: nginx-deployment
```

使用命令 `kubectl apply -f gitrepo.yaml` 将该对象部署到集群中。
Expand Down
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@

The kcl-controller is a component developed for the integration of [KCL](https://github.com/kcl-lang/kcl) and [Flux](https://github.com/fluxcd/flux2), designed to orchestrate continuous delivery pipelines for infrastructure and workloads defined with KCL based on the [source-controller](https://github.com/fluxcd/source-controller) to acquire the KCL program from repositories.

![kcl-flux](./docs/img/kcl-flux.png)

# Features

- Periodically monitor git repositories that store KCL programs and reconcile k8s cluster status according to changes in git repositories.
Expand Down Expand Up @@ -75,6 +77,16 @@ spec:
url: https://github.com/awesome-kusion/kcl-deployment.git
ref:
branch: main # Monitor the main branch
---
apiVersion: krm.kcl.dev.fluxcd/v1alpha1
kind: KCLRun
metadata:
name: kcl-git-controller
namespace: default
spec:
sourceRef:
kind: GitRepository
name: nginx-deployment
```

Use the command `kubectl apply -f gitrepo.yaml` to deploy the object to the cluster.
Expand Down
Binary file added docs/img/kcl-flux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.