Skip to content

Commit 41721d8

Browse files
committed
Merge branch 'main' of https://github.com/markthink/helm-charts into main
2 parents 997008e + 84b0263 commit 41721d8

File tree

106 files changed

+7708
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

106 files changed

+7708
-0
lines changed

.DS_Store

6 KB
Binary file not shown.

.github/workflows/gith.yml

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# https://wangchujiang.com/reference/docs/github-actions.html
2+
name: Release Charts
3+
4+
on:
5+
push:
6+
branches:
7+
- main
8+
9+
jobs:
10+
release:
11+
# depending on default permission settings for your org (contents being read-only or read-write for workloads), you will have to add permissions
12+
# see: https://docs.github.com/en/actions/security-guides/automatic-token-authentication#modifying-the-permissions-for-the-github_token
13+
permissions:
14+
contents: write
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: Checkout
18+
uses: actions/checkout@v3
19+
with:
20+
fetch-depth: 0
21+
22+
- name: Configure Git
23+
run: |
24+
git config user.name "$GITHUB_ACTOR"
25+
git config user.email "$GITHUB_ACTOR@users.noreply.github.com"
26+
27+
- name: Install Helm
28+
uses: azure/setup-helm@v3
29+
30+
- name: Run chart-releaser
31+
uses: helm/chart-releaser-action@v1.5.0
32+
with:
33+
charts_dir: charts
34+
env:
35+
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"

.gitignore

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
.vscode
2+
.vagrant
3+
nacos-k8s
4+
mysql-schema.sql
5+
nacos.yaml
6+
nacos-sdk-go
7+
csi_values.yaml
8+
nginx.yaml
9+
nacos-bot
10+
ask

.helmignore

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Patterns to ignore when building packages.
2+
# This supports shell glob matching, relative path matching, and
3+
# negation (prefixed with !). Only one pattern per line.
4+
.DS_Store
5+
# Common VCS dirs
6+
.git/
7+
.gitignore
8+
.bzr/
9+
.bzrignore
10+
.hg/
11+
.hgignore
12+
.svn/
13+
# Common backup files
14+
*.swp
15+
*.bak
16+
*.tmp
17+
*.orig
18+
*~
19+
# Various IDEs
20+
.project
21+
.idea/
22+
*.tmproj
23+
.vscode/

README.md

+51
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
# helm-charts
2+
3+
## Usage
4+
5+
Bioos 开源版本以 [Helm](https://helm.sh) 形式分发,安装参考 [Bioos 开源部署方案设计](https://bytedance.feishu.cn/docx/IrwHdNXi8oGYRPxe6VCcCPsMnmf)
6+
7+
本仓库提供 helm 包的分发,适用于 github 部署 helm 仓库
8+
9+
```bash
10+
helm repo add bioos https://markthink.github.io/helm-charts
11+
helm search repo bioos
12+
```
13+
14+
如果要更新仓库,执行 `helm repo update` 获取最新的仓库部署包
15+
16+
17+
### Step1. 安装 mysql
18+
19+
```bash
20+
helm install mysql \
21+
--set auth.rootPassword="admin",auth.database=bioos,auth.username=admin,auth.password=admin,global.storageClass=nfs-csi,primary.persistence.size=50Gi \
22+
oci://registry-1.docker.io/bitnamicharts/mysql
23+
```
24+
25+
### Step2. 安装 cromwell/jupyterhub
26+
27+
参考 charts/cromwell/values.yaml|charts/jupyterhub/values.example.yaml 修改配置
28+
29+
```bash
30+
helm install cromwell bioos/cromwell -f values_well.yaml
31+
helm install jupyterhub bioos/jupyterhub -f values_hub.yaml
32+
```
33+
34+
### Step3. 安装 Bioos apiserver/web
35+
36+
参考 charts/bioos/values.yaml 修改配置
37+
38+
```bash
39+
helm install cromwell bioos/bioos -f values.yaml
40+
```
41+
42+
43+
# 参考资源:
44+
- [helm 集成 kustomization](https://austindewey.com/2020/07/27/patch-any-helm-chart-template-using-a-kustomize-post-renderer/)
45+
- https://github.com/kubernetes-sigs/kustomize/issues/680
46+
- https://github.com/kubernetes-sigs/kustomize/issues/3787
47+
48+
```bash
49+
helm install demo $PATH_TO_CHART --post-renderer=./hook.sh
50+
```
51+

StorageClass/README.md

+85
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
# StorageClass
2+
3+
使用 Kustomize 处理相关变参,代码结构如下:
4+
5+
```bash
6+
root@opensource-bioos:~/helm-charts/StorageClass# tree .
7+
.
8+
├── base
9+
│   ├── kustomization.yaml
10+
│   └── yaml
11+
│   ├── ingress-nginx.yaml
12+
│   └── sc.yaml
13+
└── overlays
14+
├── dev
15+
│   └── kustomization.yaml
16+
└── prod
17+
└── kustomization.yaml
18+
19+
5 directories, 5 files
20+
```
21+
配置文件目录结构如上
22+
23+
- base 是基础的资源配置文件
24+
- overlays 根据不同的环境配置相关的变量
25+
26+
进入目录执行下面的命令查看生成结果,生成之前,需要修改kustomization.yaml 文件
27+
```yaml
28+
apiVersion: kustomize.config.k8s.io/v1beta1
29+
kind: Kustomization
30+
# https://kubectl.docs.kubernetes.io/references/kustomize/kustomization/patches/
31+
# https://kubectl.docs.kubernetes.io/references/kustomize/kustomization/patchesjson6902/
32+
resources:
33+
# - yaml/ingress-nginx.yaml
34+
- yaml/sc.yaml
35+
36+
patches:
37+
- patch: |-
38+
- op: replace
39+
path: /parameters/server
40+
value: 192.168.46.300 #这里填写 nfs server 地址
41+
- op: replace
42+
path: /parameters/share
43+
value: /nfs #这里填写 nfs server 根目录地址
44+
target:
45+
kind: StorageClass
46+
name: nfs-csi
47+
48+
- patch: |-
49+
- op: replace
50+
path: /spec/csi/volumeAttributes/server
51+
value: 192.168.46.300
52+
- op: replace
53+
path: /spec/csi/volumeAttributes/share
54+
value: /nfs
55+
- op: replace
56+
path: /spec/csi/volumeHandle
57+
value: 192.168.46.300#nfs#bioos-storage#
58+
- op: replace
59+
path: /spec/capacity/storage
60+
value: 50Gi
61+
target:
62+
kind: PersistentVolume
63+
name: bioos-storage
64+
65+
- patch: |-
66+
- op: replace
67+
path: /spec/resources/requests/storage
68+
value: 50Gi #这里配置存储块的大小
69+
target:
70+
kind: PersistentVolumeClaim
71+
name: bioos-storage-pvc
72+
```
73+
74+
填写正确的 server 相关信息,执行命令检查无误
75+
```bash
76+
# kubectl kustomize <kustomization_directory>
77+
cd base
78+
kubectl kustomize .
79+
```
80+
执行下面的命令完成资源创建
81+
```bash
82+
# kubectl apply -k <kustomization_directory>
83+
cd base
84+
kubectl apply -k .
85+
```

StorageClass/base/kustomization.yaml

+46
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
apiVersion: kustomize.config.k8s.io/v1beta1
2+
kind: Kustomization
3+
# https://kubectl.docs.kubernetes.io/references/kustomize/kustomization/patches/
4+
# https://kubectl.docs.kubernetes.io/references/kustomize/kustomization/patchesjson6902/
5+
resources:
6+
# - yaml/ingress-nginx.yaml
7+
- yaml/sc.yaml
8+
9+
patches:
10+
- patch: |-
11+
- op: replace
12+
path: /parameters/server
13+
value: 192.168.46.300
14+
- op: replace
15+
path: /parameters/share
16+
value: /nfs
17+
target:
18+
kind: StorageClass
19+
name: nfs-csi
20+
21+
- patch: |-
22+
- op: replace
23+
path: /spec/csi/volumeAttributes/server
24+
value: 192.168.46.300
25+
- op: replace
26+
path: /spec/csi/volumeAttributes/share
27+
value: /nfs
28+
- op: replace
29+
path: /spec/csi/volumeHandle
30+
value: 192.168.46.300#nfs#bioos-storage#
31+
- op: replace
32+
path: /spec/capacity/storage
33+
value: 50Gi
34+
target:
35+
kind: PersistentVolume
36+
name: bioos-storage
37+
38+
- patch: |-
39+
- op: replace
40+
path: /spec/resources/requests/storage
41+
value: 50Gi
42+
target:
43+
kind: PersistentVolumeClaim
44+
name: bioos-storage-pvc
45+
46+

0 commit comments

Comments
 (0)