Skip to content

Commit 5971291

Browse files
authored
feat: support installing mongodb in the helm chart (#352)
* feat: support installing mongodb in the helm chart Signed-off-by: rick <[email protected]> * update helm dep before package Signed-off-by: rick <[email protected]> --------- Signed-off-by: rick <[email protected]> Co-authored-by: rick <[email protected]>
1 parent e32cd16 commit 5971291

File tree

8 files changed

+66
-9
lines changed

8 files changed

+66
-9
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,6 @@ cmd/data/index.js
1212
cmd/data/index.css
1313
operator/bundle
1414
helm/*.tgz
15+
helm/api-testing/*.tgz
1516
oryxBuildBinary
17+
/helm/api-testing/charts/

Makefile

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ TOOLEXEC?= #-toolexec="skywalking-go-agent"
44
BUILD_FLAG?=-ldflags "-w -s -X github.com/linuxsuren/api-testing/pkg/version.version=$(shell git describe --tags) \
55
-X github.com/linuxsuren/api-testing/pkg/version.date=$(shell date +%Y-%m-%d)"
66
GOPROXY?=direct
7-
HELM_VERSION?=v0.0.2
7+
HELM_VERSION?=v0.0.3
88
APP_VERSION?=v0.0.13
99
HELM_REPO?=docker.io/linuxsuren
1010

@@ -56,11 +56,13 @@ copy-restart: build-embed-ui
5656
atest service restart
5757

5858
# helm
59-
helm-package:
59+
helm-dev-update:
60+
helm dep update helm/api-testing
61+
helm-package: helm-dev-update
6062
helm package helm/api-testing --version ${HELM_VERSION}-helm --app-version ${APP_VERSION} -d bin
6163
helm-push:
6264
helm push bin/api-testing-${HELM_VERSION}-helm.tgz oci://${HELM_REPO}
63-
helm-lint:
65+
helm-lint: helm-dev-update
6466
helm lint helm/api-testing
6567

6668
test:

go.work.sum

Lines changed: 39 additions & 0 deletions
Large diffs are not rendered by default.

helm/api-testing/Chart.lock

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
dependencies:
2+
- name: mongodb
3+
repository: oci://registry-1.docker.io/bitnamicharts
4+
version: 15.1.3
5+
digest: sha256:40d43cd158585ff78c94e3eb2f46d2410488923a1e9242bf5c8c8af5bac0707d
6+
generated: "2024-04-09T11:17:10.1150205+08:00"

helm/api-testing/Chart.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,9 @@ version: v0.0.4
2222
# follow Semantic Versioning. They should reflect the version the application is using.
2323
# It is recommended to use it with quotes.
2424
appVersion: "v0.0.15"
25+
26+
dependencies:
27+
- name: mongodb
28+
version: ^15.0.1
29+
repository: oci://registry-1.docker.io/bitnamicharts
30+
condition: mongodb.enabled

helm/api-testing/templates/deployment.yaml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ spec:
3737
command:
3838
- atest
3939
- server
40-
- --local-storage=/var/www/sample/*.yaml
40+
- --local-storage=/root/.atest/data/*.yaml
4141
{{- if .Values.skywalking.endpoint.http }}
4242
- --skywalking={{ .Values.skywalking.endpoint.http }}
4343
{{- end }}
@@ -66,9 +66,6 @@ spec:
6666
path: /healthz
6767
port: http
6868
volumeMounts:
69-
- name: data
70-
mountPath: /var/www/sample
71-
subPath: {{ $core.subPath }}
7269
- name: data
7370
mountPath: /root
7471
subPath: config

helm/api-testing/templates/pvc.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,5 @@ spec:
1919
storageClassName: {{ $core.storageClass }}
2020
{{- end }}
2121
{{- end }}
22+
volumeMode: {{ $core.volumeMode }}
2223
{{- end }}

helm/api-testing/values.yaml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
replicaCount: 1
66

77
image:
8-
registry: linuxsuren.docker.scarf.sh
8+
registry: docker.io
99
repository: linuxsuren/api-testing
1010
tag: ""
1111
digest: ""
@@ -89,8 +89,9 @@ persistence:
8989
existingClaim: ""
9090
storageClass: ""
9191
subPath: ""
92-
accessMode: ReadWriteMany
92+
accessMode: ReadWriteOnce
9393
size: 500Mi
94+
volumeMode: Filesystem
9495

9596
skywalking:
9697
endpoint:
@@ -102,3 +103,6 @@ nodeSelector: {}
102103
tolerations: []
103104

104105
affinity: {}
106+
107+
mongodb:
108+
enabled: false

0 commit comments

Comments
 (0)