Skip to content

Commit e6df7fc

Browse files
authored
Revise CICD guide (#329)
Signed-off-by: Benjamin Huo <benjamin@kubesphere.io>
1 parent 4b6c2a7 commit e6df7fc

File tree

1 file changed

+16
-16
lines changed

1 file changed

+16
-16
lines changed

content/en/docs/concepts/cicd.md

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -7,36 +7,36 @@ description:
77

88
## Overview
99

10-
OpenFunction has realized automatic building and serving, what we need now is to trigger it when the code changes, thus forming a complete CICD.
10+
Previously users can use OpenFunction to build function or application source code into container images and then deploy the built image directly to the underlying sync/async Serverless runtime without user intervention.
1111

12-
OpenFunction use Revision Controller to trigger build when the source code changed, or rerun the application when the image changed.
12+
But OpenFunction can neither rebuild the image and then redeploy it whenever the function or application source code changes nor redeploy the image whenever this image changes (When the image is built and pushed manually or in another function)
1313

14-
The Revision Controller will:
15-
- Watch the source code in github, gitlab or gitee, rebuild the function when source code changed.
16-
- Watch the bundle container image which include the soucre code, rebuild the function when image changed.
17-
- Watch the images of functions that without builder, rerun the image when image changed.
14+
Starting from v1.0.0, OpenFunction adds the ability to detect source code or image changes and then rebuilt and/or redeploy the new built image in a new component called `Revision Controller`. The Revision Controller is able to:
15+
- Detect source code changes in github, gitlab or gitee, then rebuild and redeploy the new built image whenever the source code changes.
16+
- Detect the bundle container image (image containing the source code) changes, then rebuild and redeploy the new built image whenever the bundle image changes.
17+
- Detect the function or application image changes, then redeploy the new image whenever the function or application image changes.
1818

1919
## Quick start
2020

21-
### Install
21+
### Install `Revision Controller`
2222

23-
You can install the Revision Controller when installing the [OpenFunction](https://openfunction.dev/docs/getting-started/installation/#install-openfunction), just need to add the following flag to the helm command.
23+
You can enable `Revision Controller` when installing [OpenFunction](https://openfunction.dev/docs/getting-started/installation/#install-openfunction) by simply adding the following flag to the helm command.
2424

2525
```shell
2626
--set revisionController.enable=true
2727
```
2828

29-
Or you can install the `Revision Controller` after the `OpenFunction` installed by the following command.
29+
You can also enable `Revision Controller` after `OpenFunction` is installed:
3030

3131
```shell
3232
kubectl apply -f https://raw.githubusercontent.com/OpenFunction/revision-controller/release-1.0/deploy/bundle.yaml
3333
```
3434

35-
> The `Revision Controller` willbe installed to the `openfunction` namespace by default, if you want to install it to another namespace, please download the `bundle.yaml` and modify it before apply.
35+
> The `Revision Controller` will be installed to the `openfunction` namespace by default. You can download `bundle.yaml` and change the namespace manually if you want to install it to another namespace.
3636
37-
### How to use
37+
### Detect source code or image changes
3838

39-
To watch a function, just need to add some annotations to it.
39+
To detect source code or image changes, you'll need to add revision controller switch and params like below to a function's annotation.
4040

4141
```yaml
4242
apiVersion: core.openfunction.io/v1beta1
@@ -61,16 +61,16 @@ Annotations
6161
6262
| Key | Description |
6363
| ---------------------------------------------- | ---------------------------------------------------------------------------------------------- |
64-
| **openfunction.io/revision-controller** | Whether to start a revision controller for this function, known values are enable and disable. |
64+
| **openfunction.io/revision-controller** | Whether to enable revision controller to detect source code or image changes for this function, can be set to either `enable` or `disable`. |
6565
| **openfunction.io/revision-controller-params** | Parameters for revision controller. |
6666

6767
Parameters
6868

6969
| Name | Description |
7070
| --------------------- | ------------------------------------------------------------------------------------------------------------------ |
71-
| **type** | The target type to watch, known values are source, source-image, image. |
72-
| **polling-interval** | The interval to get the image digest or source code head. |
73-
| **repo-type** | The type of the git server where the source code be in, known values are github, gitlab, gitee, default is github. |
71+
| **type** | The change type to detect including `source`, `source-image`, and `image`. |
72+
| **polling-interval** | The interval to polling the image digest or source code head. |
73+
| **repo-type** | The type of the git repo including `github`, `gitlab`, and `gitee`. Default to `github`. |
7474
| **base-url** | The base url of the gitlab server. |
7575
| **auth-type** | The auth type of the gitlab server. |
7676
| **project-id** | The project id of a gitlab repo. |

0 commit comments

Comments
 (0)