Skip to content

Commit

Permalink
feat: support installing mongodb in the helm chart (#352)
Browse files Browse the repository at this point in the history
* feat: support installing mongodb in the helm chart

Signed-off-by: rick <LinuxSuRen@users.noreply.github.com>

* update helm dep before package

Signed-off-by: rick <LinuxSuRen@users.noreply.github.com>

---------

Signed-off-by: rick <LinuxSuRen@users.noreply.github.com>
Co-authored-by: rick <LinuxSuRen@users.noreply.github.com>
  • Loading branch information
LinuxSuRen and LinuxSuRen committed Apr 9, 2024
1 parent e32cd16 commit 5971291
Show file tree
Hide file tree
Showing 8 changed files with 66 additions and 9 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Expand Up @@ -12,4 +12,6 @@ cmd/data/index.js
cmd/data/index.css
operator/bundle
helm/*.tgz
helm/api-testing/*.tgz
oryxBuildBinary
/helm/api-testing/charts/
8 changes: 5 additions & 3 deletions Makefile
Expand Up @@ -4,7 +4,7 @@ TOOLEXEC?= #-toolexec="skywalking-go-agent"
BUILD_FLAG?=-ldflags "-w -s -X github.com/linuxsuren/api-testing/pkg/version.version=$(shell git describe --tags) \
-X github.com/linuxsuren/api-testing/pkg/version.date=$(shell date +%Y-%m-%d)"
GOPROXY?=direct
HELM_VERSION?=v0.0.2
HELM_VERSION?=v0.0.3
APP_VERSION?=v0.0.13
HELM_REPO?=docker.io/linuxsuren

Expand Down Expand Up @@ -56,11 +56,13 @@ copy-restart: build-embed-ui
atest service restart

# helm
helm-package:
helm-dev-update:
helm dep update helm/api-testing
helm-package: helm-dev-update
helm package helm/api-testing --version ${HELM_VERSION}-helm --app-version ${APP_VERSION} -d bin
helm-push:
helm push bin/api-testing-${HELM_VERSION}-helm.tgz oci://${HELM_REPO}
helm-lint:
helm-lint: helm-dev-update
helm lint helm/api-testing

test:
Expand Down
39 changes: 39 additions & 0 deletions go.work.sum

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions helm/api-testing/Chart.lock
@@ -0,0 +1,6 @@
dependencies:
- name: mongodb
repository: oci://registry-1.docker.io/bitnamicharts
version: 15.1.3
digest: sha256:40d43cd158585ff78c94e3eb2f46d2410488923a1e9242bf5c8c8af5bac0707d
generated: "2024-04-09T11:17:10.1150205+08:00"
6 changes: 6 additions & 0 deletions helm/api-testing/Chart.yaml
Expand Up @@ -22,3 +22,9 @@ version: v0.0.4
# follow Semantic Versioning. They should reflect the version the application is using.
# It is recommended to use it with quotes.
appVersion: "v0.0.15"

dependencies:
- name: mongodb
version: ^15.0.1
repository: oci://registry-1.docker.io/bitnamicharts
condition: mongodb.enabled
5 changes: 1 addition & 4 deletions helm/api-testing/templates/deployment.yaml
Expand Up @@ -37,7 +37,7 @@ spec:
command:
- atest
- server
- --local-storage=/var/www/sample/*.yaml
- --local-storage=/root/.atest/data/*.yaml
{{- if .Values.skywalking.endpoint.http }}
- --skywalking={{ .Values.skywalking.endpoint.http }}
{{- end }}
Expand Down Expand Up @@ -66,9 +66,6 @@ spec:
path: /healthz
port: http
volumeMounts:
- name: data
mountPath: /var/www/sample
subPath: {{ $core.subPath }}
- name: data
mountPath: /root
subPath: config
Expand Down
1 change: 1 addition & 0 deletions helm/api-testing/templates/pvc.yaml
Expand Up @@ -19,4 +19,5 @@ spec:
storageClassName: {{ $core.storageClass }}
{{- end }}
{{- end }}
volumeMode: {{ $core.volumeMode }}
{{- end }}
8 changes: 6 additions & 2 deletions helm/api-testing/values.yaml
Expand Up @@ -5,7 +5,7 @@
replicaCount: 1

image:
registry: linuxsuren.docker.scarf.sh
registry: docker.io
repository: linuxsuren/api-testing
tag: ""
digest: ""
Expand Down Expand Up @@ -89,8 +89,9 @@ persistence:
existingClaim: ""
storageClass: ""
subPath: ""
accessMode: ReadWriteMany
accessMode: ReadWriteOnce
size: 500Mi
volumeMode: Filesystem

skywalking:
endpoint:
Expand All @@ -102,3 +103,6 @@ nodeSelector: {}
tolerations: []

affinity: {}

mongodb:
enabled: false

0 comments on commit 5971291

Please sign in to comment.