Skip to content

Commit 3d043a4

Browse files
authored
feat(github): add helm charts test cicd (#32)
* feat: add helm charts test cicd Signed-off-by: Xinwei Xiong(cubxxw) <[email protected]> * fix: add chat thmp * fix: add chat thmp * fix: add chat thmp * fix: add chat thmp * fix: add chat thmp * fix: add chat thmp * fix: add chat thmp * fix: add chat thmp --------- Signed-off-by: Xinwei Xiong(cubxxw) <[email protected]>
1 parent 300fc69 commit 3d043a4

File tree

9 files changed

+310
-18
lines changed

9 files changed

+310
-18
lines changed

.github/workflows/helm-charts-test.yml

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ jobs:
1313
- name: Checkout
1414
uses: actions/checkout@v4
1515

16-
- uses: engineerd/[email protected]
16+
- name: Create k8s Kind Cluster
17+
uses: helm/[email protected]
1718
- name: Testing
1819
run: |
1920
sudo kubectl cluster-info
@@ -23,32 +24,40 @@ jobs:
2324
continue-on-error: true
2425

2526
- name: Install Helm
26-
uses: azure/setup-helm@v3
27+
uses: azure/setup-helm@5119fcb9089d432beecbf79bb2c7915207344b78 # v3.5
2728
with:
28-
version: '3.x'
29-
id: install
29+
version: v3.10.1 # Also update in lint-and-test.yaml
3030

3131
- name: Create Kubernetes Cluster
3232
run: |
3333
sudo kind create cluster
3434
sudo kubectl cluster-info
35+
sudo kubectl create namespace openim
36+
37+
- name: Install basic components
38+
run: |
39+
# ingress
40+
helm install ingress-nginx ./infra/ingress-nginx/ -f infra/ingress-nginx/config.yaml -n kube-system
41+
42+
# nfs
43+
helm install nfs-subdir-external-provisioner ./infra/nfs-subdir-external-provisioner/ -f infra/nfs-subdir-external-provisioner/config.yaml -n kube-system
3544
3645
- name: Install OpenIM Middleware
3746
run: |
3847
# Install MySQL
39-
helm install im-mysql infra/mysql -f infra/mysql-config.yaml -n openim
48+
helm install my-release oci://registry-1.docker.io/bitnamicharts/mysql -f infra/mysql-config.yaml -n openim --create-namespace
4049
4150
# Install Kafka
42-
helm install im-kafka infra/kafka -f infra/kafka-config.yaml -n openim
51+
helm install im-kafka infra/kafka -f infra/kafka-config.yaml -n openim --create-namespace
4352
4453
# Install MinIO
45-
helm install im-minio infra/minio -f infra/minio-config.yaml -n openim
54+
helm install im-minio infra/minio -f infra/minio-config.yaml -n openim --create-namespace
4655
4756
# Install MongoDB
48-
helm install im-mongodb infra/mongodb -f infra/mongodb-config.yaml -n openim
57+
helm install im-mongodb infra/mongodb -f infra/mongodb-config.yaml -n openim --create-namespace
4958
5059
# Install Redis
51-
helm install im-redis infra/redis -f infra/redis-config.yaml -n openim
60+
helm install im-redis infra/redis -f infra/redis-config.yaml -n openim --create-namespace
5261
5362
- name: Install OpenIM Services
5463
run: |
@@ -66,7 +75,6 @@ jobs:
6675
6776
- name: Test Installation
6877
run: |
69-
# 这里添加一些基本的测试命令,例如检查 Pod 状态
7078
sudo kubectl get pods -n openim
7179
7280
- name: Cleanup

charts/openim-admin/Chart.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
apiVersion: v2
22
name: openim-admin
3-
description: A Helm chart for Kubernetes
3+
description: Openim-admin is the administrative backend for openim
44

55
# A chart can be either an 'application' or a 'library' chart.
66
#
@@ -15,14 +15,16 @@ type: application
1515
# This is the chart version. This version number should be incremented each time you make changes
1616
# to the chart and its templates, including the app version.
1717
# Versions are expected to follow Semantic Versioning (https://semver.org/)
18-
version: 0.1.0
18+
version: 0.1.1
1919

2020
# This is the version number of the application being deployed. This version number should be
2121
# incremented each time you make changes to the application. Versions are not expected to
2222
# follow Semantic Versioning. They should reflect the version the application is using.
2323
# It is recommended to use it with quotes.
2424
appVersion: "1.16.0"
2525

26+
home: https://github.com/openimsdk/helm-charts
27+
2628
icon: https://raw.githubusercontent.com/openimsdk/open-im-server/main/assets/openim-logo-gradient.svg
2729

2830
maintainers:

charts/openim-admin/README.md.gotmpl

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
# OpenIM-Admin Helm Chart
2+
3+
## Introduction
4+
5+
This chart bootstraps an OpenIM-Admin deployment on a Kubernetes cluster using the Helm package manager.
6+
7+
OpenIM-Admin is the administrative backend for OpenIM, providing an interface for managing the OpenIM infrastructure.
8+
9+
## Prerequisites
10+
11+
- Kubernetes 1.12+
12+
- Helm 3.0+
13+
14+
## Installing the Chart
15+
16+
To install the chart with the release name `my-release`:
17+
18+
```bash
19+
helm repo add openim https://github.com/openimsdk/helm-charts
20+
helm install my-release openim/openim-admin
21+
```
22+
23+
{{ template "chart.sourcesList" . }}
24+
25+
This command deploys OpenIM-Admin on the Kubernetes cluster in the default configuration. The [Parameters](https://chat.openai.com/c/892a8ceb-729a-496a-829b-98d2d1b74cc3#parameters) section lists the parameters that can be configured during installation.
26+
27+
## Uninstalling the Chart
28+
29+
To uninstall/delete the `my-release` deployment:
30+
31+
```bash
32+
helm delete my-release
33+
```
34+
35+
This command removes all the Kubernetes components associated with the chart and deletes the release.
36+
37+
## Parameters
38+
39+
The following table lists the configurable parameters of the OpenIM-Admin chart and their default values.
40+
41+
| Parameter | Description | Default |
42+
| ------------------ | ----------------- | -------------- |
43+
| `image.repository` | Image repository | `nil` |
44+
| `image.tag` | Image tag | `nil` |
45+
| `image.pullPolicy` | Image pull policy | `IfNotPresent` |
46+
| ... | ... | ... |
47+
48+
## Configuration
49+
50+
Refer to [values.yaml](https://github.com/openimsdk/helm-charts/blob/main/charts/openim-admin/values.yaml) for the full run-down on defaults. These are YAML files that supply values to your templates.
51+
52+
## Upgrading
53+
54+
To upgrade the chart:
55+
56+
```bash
57+
helm upgrade my-release openim/openim-admin
58+
```
59+
60+
## Additional Information
61+
62+
+ Learn more about OpenIM: [OpenIM GitHub](https://github.com/openimsdk)
63+
+ Source code for OpenIM Server: [OpenIM Server GitHub](https://github.com/openimsdk/open-im-server)
64+
65+
## Maintainers
66+
67+
+ [OpenIM](https://github.com/openimsdk)
68+
69+
## License
70+
71+
This project is licensed under the [Apache License 2.0](https://github.com/openimsdk/open-im-server/blob/main/LICENSE).

charts/openim-chat/Chart.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
apiVersion: v2
22
name: admin-api
3-
description: A Helm chart for Kubernetes
3+
description: OpenIM chat is an open source openim's business server
44

55
# A chart can be either an 'application' or a 'library' chart.
66
#
@@ -15,14 +15,16 @@ type: application
1515
# This is the chart version. This version number should be incremented each time you make changes
1616
# to the chart and its templates, including the app version.
1717
# Versions are expected to follow Semantic Versioning (https://semver.org/)
18-
version: 0.1.0
18+
version: 0.1.1
1919

2020
# This is the version number of the application being deployed. This version number should be
2121
# incremented each time you make changes to the application. Versions are not expected to
2222
# follow Semantic Versioning. They should reflect the version the application is using.
2323
# It is recommended to use it with quotes.
2424
appVersion: "1.16.0"
2525

26+
home: https://github.com/openimsdk/helm-charts
27+
2628
icon: https://raw.githubusercontent.com/openimsdk/open-im-server/main/assets/openim-logo-gradient.svg
2729

2830
maintainers:

charts/openim-chat/README.md.gotmpl

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
# Admin-API Helm Chart
2+
3+
## Introduction
4+
5+
This chart bootstraps an Admin-API deployment on a Kubernetes cluster using the Helm package manager.
6+
7+
Admin-API is the business server component of OpenIM Chat, an open source instant messaging platform.
8+
9+
## Prerequisites
10+
11+
- Kubernetes 1.12+
12+
- Helm 3.0+
13+
14+
## Installing the Chart
15+
16+
To install the chart with the release name `my-admin-api`:
17+
18+
```bash
19+
helm repo add openim https://github.com/openimsdk/helm-charts
20+
helm install my-admin-api openim/admin-api
21+
```
22+
23+
This command deploys Admin-API on the Kubernetes cluster in the default configuration. The [Parameters](https://chat.openai.com/c/892a8ceb-729a-496a-829b-98d2d1b74cc3#parameters) section lists the parameters that can be configured during installation.
24+
25+
## Uninstalling the Chart
26+
27+
To uninstall/delete the `my-admin-api` deployment:
28+
29+
```bash
30+
helm delete my-admin-api
31+
```
32+
33+
This command removes all the Kubernetes components associated with the chart and deletes the release.
34+
35+
## Parameters
36+
37+
The following table lists the configurable parameters of the Admin-API chart and their default values.
38+
39+
| Parameter | Description | Default |
40+
| ------------------ | ----------------- | -------------- |
41+
| `image.repository` | Image repository | `nil` |
42+
| `image.tag` | Image tag | `nil` |
43+
| `image.pullPolicy` | Image pull policy | `IfNotPresent` |
44+
| ... | ... | ... |
45+
46+
## Configuration
47+
48+
Refer to [values.yaml](https://github.com/openimsdk/helm-charts/blob/main/charts/admin-api/values.yaml) for the full run-down on defaults. These are YAML files that supply values to your templates.
49+
50+
## Upgrading
51+
52+
To upgrade the chart:
53+
54+
```bash
55+
helm upgrade my-admin-api openim/admin-api
56+
```
57+
58+
## Additional Information
59+
60+
+ Learn more about OpenIM Chat: [OpenIM Chat GitHub](https://github.com/openimsdk/chat)
61+
+ OpenIM Helm Charts: [OpenIM Helm Charts GitHub](https://github.com/openimsdk/helm-charts)
62+
63+
## Maintainers
64+
65+
+ [OpenIM](https://github.com/openimsdk)
66+
67+
## License
68+
69+
This project is licensed under the [Apache License 2.0](https://github.com/openimsdk/chat/blob/main/LICENSE).

charts/openim-server/Chart.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
apiVersion: v2
22
name: openim-api
3-
description: A Helm chart for Kubernetes
3+
description: OpenIM is an open source instant messaging server based on the open source framework of the open source instant messaging SDK.
44

55
# A chart can be either an 'application' or a 'library' chart.
66
#
@@ -15,14 +15,16 @@ type: application
1515
# This is the chart version. This version number should be incremented each time you make changes
1616
# to the chart and its templates, including the app version.
1717
# Versions are expected to follow Semantic Versioning (https://semver.org/)
18-
version: 0.1.0
18+
version: 0.1.1
1919

2020
# This is the version number of the application being deployed. This version number should be
2121
# incremented each time you make changes to the application. Versions are not expected to
2222
# follow Semantic Versioning. They should reflect the version the application is using.
2323
# It is recommended to use it with quotes.
2424
appVersion: "1.16.0"
2525

26+
home: https://github.com/openimsdk/helm-charts
27+
2628
icon: https://raw.githubusercontent.com/openimsdk/open-im-server/main/assets/openim-logo-gradient.svg
2729

2830
maintainers:

charts/openim-server/README.md.gotmpl

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
# OpenIM-API Helm Chart
2+
3+
## Introduction
4+
5+
This chart facilitates the deployment of OpenIM-API, an open source instant messaging server, on a Kubernetes cluster. OpenIM-API is built upon the open source framework of the OpenIM instant messaging SDK.
6+
7+
## Prerequisites
8+
9+
- Kubernetes 1.12+
10+
- Helm 3.0+
11+
12+
## Installing the Chart
13+
14+
To install the chart with the release name `my-openim-api`:
15+
16+
```bash
17+
helm repo add openim https://github.com/openimsdk/helm-charts
18+
helm install my-openim-api openim/openim-api
19+
```
20+
21+
This command deploys OpenIM-API on the Kubernetes cluster using the default configuration. The [Parameters](https://chat.openai.com/c/892a8ceb-729a-496a-829b-98d2d1b74cc3#parameters) section lists the parameters that can be configured during installation.
22+
23+
## Uninstalling the Chart
24+
25+
To uninstall/delete the `my-openim-api` deployment:
26+
27+
```bash
28+
helm delete my-openim-api
29+
```
30+
31+
This command removes all the Kubernetes components associated with the chart and deletes the release.
32+
33+
## Parameters
34+
35+
The following table lists the configurable parameters of the OpenIM-API chart and their default values.
36+
37+
| Parameter | Description | Default |
38+
| ------------------ | ----------------- | -------------- |
39+
| `image.repository` | Image repository | `nil` |
40+
| `image.tag` | Image tag | `nil` |
41+
| `image.pullPolicy` | Image pull policy | `IfNotPresent` |
42+
| ... | ... | ... |
43+
44+
## Configuration
45+
46+
Refer to the [values.yaml](https://github.com/openimsdk/helm-charts/blob/main/charts/openim-api/values.yaml) for a comprehensive rundown on defaults. These YAML files supply values to your templates.
47+
48+
## Upgrading
49+
50+
To upgrade the chart:
51+
52+
```bash
53+
helm upgrade my-openim-api openim/openim-api
54+
```
55+
56+
## Additional Information
57+
58+
+ Explore more about OpenIM: [OpenIM GitHub](https://github.com/openimsdk/open-im-server)
59+
+ Helm Charts repository: [OpenIM Helm Charts](https://github.com/openimsdk/helm-charts)
60+
61+
## Maintainers
62+
63+
+ [OpenIM](https://github.com/openimsdk)
64+
65+
## License
66+
67+
This project is licensed under the [Apache License 2.0](https://github.com/openimsdk/open-im-server/blob/main/LICENSE).

charts/openim-web/Chart.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
apiVersion: v2
22
name: openim-web
3-
description: A Helm chart for Kubernetes
3+
description: Openim-web is the front-end web chat of openim
44

55
# A chart can be either an 'application' or a 'library' chart.
66
#
@@ -15,14 +15,16 @@ type: application
1515
# This is the chart version. This version number should be incremented each time you make changes
1616
# to the chart and its templates, including the app version.
1717
# Versions are expected to follow Semantic Versioning (https://semver.org/)
18-
version: 0.1.0
18+
version: 0.1.1
1919

2020
# This is the version number of the application being deployed. This version number should be
2121
# incremented each time you make changes to the application. Versions are not expected to
2222
# follow Semantic Versioning. They should reflect the version the application is using.
2323
# It is recommended to use it with quotes.
2424
appVersion: "1.16.0"
2525

26+
home: https://github.com/openimsdk/helm-charts
27+
2628
icon: https://raw.githubusercontent.com/openimsdk/open-im-server/main/assets/openim-logo-gradient.svg
2729

2830
maintainers:

0 commit comments

Comments
 (0)