Skip to content

Commit

Permalink
fix:update helm chart for external db configs
Browse files Browse the repository at this point in the history
  • Loading branch information
torsten-simon committed Jun 17, 2024
1 parent 550934a commit ece26f2
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 18 deletions.
4 changes: 2 additions & 2 deletions deploy/docker/helm/src/main/chart/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ apiVersion: v2
name: edu-sharing-services-connector
description: Helm chart for edu-sharing connector app
type: application
version: 8.1.9998
appVersion: 0.1.0
version: 8.1.2
appVersion: 8.1.2
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ spec:
- ReadWriteMany
resources:
requests:
storage: "30Gi"
storage: {{ .Values.database.storageSize }}
3 changes: 2 additions & 1 deletion deploy/docker/helm/src/main/chart/templates/service.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ spec:
targetPort: api

---

{{- if .Values.database.enabled }}
kind: Service
apiVersion: v1
metadata:
Expand All @@ -23,3 +23,4 @@ spec:
- port: 3306
name: tcp-db
targetPort: db
{{- end }}
23 changes: 10 additions & 13 deletions deploy/docker/helm/src/main/chart/templates/statefulset.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,15 @@ spec:
- name: PORT_EXTERNAL
value: "443"
- name: DATABASE_HOST
value: edu-sharing-connector-db
value: {{ if .Values.database.enabled }}"edu-sharing-connector-db"{{ else }}{{ .Values.database.config.host }}{{ end }}
- name: DATABASE_PORT
value: "3306"
value: {{ if .Values.database.enabled }}"3306"{{ else }}"{{ .Values.database.config.port }}"{{ end }}
- name: DATABASE_USER
value: "connector"
value: {{ if .Values.database.enabled }}"connector"{{ else }}{{ .Values.database.config.username }}{{ end }}
- name: DATABASE_NAME
value: "connector"
value: {{ if .Values.database.enabled }}"connector"{{ else }}{{ .Values.database.config.database }}{{ end }}
- name: DATABASE_PASSWORD
value: {{ required "A valid .Values.passwordDB is required!" .Values.passwordDB }}
value: {{ if .Values.database.enabled }}{{required "A valid .Values.passwordDB is required!" .Values.passwordDB}}{{ else }}{{ .Values.database.config.password }}{{ end }}
- name: ONLYOFFICE_DOCUMENT_SERVER
value: {{ .Values.onlyofficeDocumentServer | default "" }}
- name: ONLYOFFICE_PLUGIN_URL
Expand Down Expand Up @@ -65,13 +65,9 @@ spec:
periodSeconds: 10
successThreshold: 1
timeoutSeconds: 10
resources:
limits:
cpu: "4000m"
memory: "4Gi"
requests:
cpu: "500m"
memory: "4Gi"
{{- with .Values.resources }}
resources: {{ toYaml . | nindent 10 }}
{{- end }}
ports:
- containerPort: 80
name: api
Expand All @@ -84,7 +80,7 @@ spec:
claimName: edu-sharing-services-connector-data

---

{{- if .Values.database.enabled }}
apiVersion: apps/v1
kind: StatefulSet
metadata:
Expand Down Expand Up @@ -136,3 +132,4 @@ spec:
resources:
requests:
storage: "16Gi"
{{ end }}
12 changes: 11 additions & 1 deletion deploy/docker/helm/src/main/chart/values.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,14 @@
baseUrl:
storageClassName:
clusterIssuer: letsencrypt
version: maven-fixes-8.1-SNAPSHOT
version: 8.1.2
database:
storageSize: 30Gi
enabled: true
# when enabled = false for external database
config:
host: "???"
port: "???"
database: "???"
username: "???"
password: "???"

0 comments on commit ece26f2

Please sign in to comment.