Skip to content

Commit 2126a7f

Browse files
authored
Merge pull request #7 from wanjunlei/sourceimage
prepare for release 1.0.0
2 parents 8f0dc57 + 3f16838 commit 2126a7f

File tree

3 files changed

+67
-2
lines changed

3 files changed

+67
-2
lines changed

CHANGLOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
## v1.0.0 / 2023-02-21
2+
3+
The first release version.

README.md

Lines changed: 63 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,63 @@
1-
# revision-controller
1+
# Revision Controller
2+
3+
## Overview
4+
5+
Revision Controller is a tool that trigger build when the source code changed, or rerun the application when the image changed.
6+
7+
- Watch the source code in github, gitlab or gitee, rebuild the function when source code changed.
8+
- Watch the bundle container image which include the soucre code, rebuild the function when image changed.
9+
- Watch the images of functions that without builder, rerun the image when image changed.
10+
11+
## Quick start
12+
13+
### Install
14+
15+
We assume you already have a Kubernetes cluster (v1.20+) with `OpenFunction`. If you don't, you can follow [this](https://openfunction.dev/docs/getting-started/installation/#install-openfunction) to install `OpenFunction`.
16+
17+
Exec the following commands to deploy the Revision Controller.
18+
19+
```shell
20+
kubectl apply -f deploy/bundle.yaml
21+
```
22+
23+
### How to use
24+
25+
To watch a function, just need to add some annotations to it.
26+
27+
```yaml
28+
apiVersion: core.openfunction.io/v1beta1
29+
kind: Function
30+
metadata:
31+
annotations:
32+
openfunction.io/revision-controller: enable
33+
openfunction.io/revision-controller-params: |
34+
type: source
35+
repo-type: github
36+
polling-interval: 1m
37+
name: function-http-java
38+
namespace: default
39+
spec:
40+
build:
41+
...
42+
serving:
43+
...
44+
```
45+
46+
Annotations
47+
48+
| Key | Description |
49+
| ---------------------------------------------- | ---------------------------------------------------------------------------------------------- |
50+
| **openfunction.io/revision-controller** | Whether to start a revision controller for this function, known values are enable and disable. |
51+
| **openfunction.io/revision-controller-params** | Parameters for revision controller. |
52+
53+
Parameters
54+
55+
| Name | Description |
56+
| --------------------- | ------------------------------------------------------------------------------------------------------------------ |
57+
| **type** | The target type to watch, known values are source, source-image, image. |
58+
| **polling-interval** | The interval to get the image digest or source code head. |
59+
| **repo-type** | The type of the git server where the source code be in, known values are github, gitlab, gitee, default is github. |
60+
| **base-url** | The base url of the gitlab server. |
61+
| **auth-type** | The auth type of the gitlab server. |
62+
| **project-id** | The project id of a gitlab repo. |
63+
| **insecure-registry** | If the image registy is insecure, you should set this to true. |

deploy/bundle.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ spec:
138138
- --zap-log-level=info
139139
command:
140140
- /revision-controller
141-
image: openfunction/revision-controller:latest
141+
image: openfunction/revision-controller:v1.0.0
142142
livenessProbe:
143143
httpGet:
144144
path: /healthz

0 commit comments

Comments
 (0)