Skip to content

Commit

Permalink
[sophora-server]_ add extraVolumes and extraVolumeMounts (#118)
Browse files Browse the repository at this point in the history
See ZUPUS-328

Co-authored-by: Sven Schliesing <[email protected]>
  • Loading branch information
muffl0n and Sven Schliesing authored Sep 11, 2024
1 parent 8aa6385 commit c5f3fd8
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 2 deletions.
2 changes: 1 addition & 1 deletion charts/sophora-server/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 2.3.3
version: 2.4.0

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
Expand Down
10 changes: 9 additions & 1 deletion charts/sophora-server/templates/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,10 @@ spec:
- name: tools
mountPath: "/tools"
{{- end }}

{{- with .Values.extraVolumeMounts}}
{{- toYaml . | nindent 12 }}
{{- end }}
env:
- name: JDK_JAVA_OPTIONS
value: >-
Expand Down Expand Up @@ -396,6 +400,10 @@ spec:
configMap:
name: {{ include "sophora-server.archiveConfigName" . }}
{{- end }}

{{- with .Values.extraVolumes}}
{{- toYaml . | nindent 8 }}
{{- end }}
volumeClaimTemplates:
- metadata:
name: sophora-server-storage
Expand All @@ -418,4 +426,4 @@ spec:
storageClassName: {{ .Values.sophora.server.storage.storageClass }}
{{- if .Values.extraVolumeClaimTemplates }}
{{ include "common.tplvalues.render" (dict "value" .Values.extraVolumeClaimTemplates "context" $) | nindent 4 }}
{{- end }}
{{- end }}
10 changes: 10 additions & 0 deletions charts/sophora-server/test-values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,16 @@ extraVolumeClaimTemplates:
storage: 2Gi
storageClassName: "premium"

extraVolumeMounts:
- mountPath: /foo
name: bar
subPath: baz

extraVolumes:
- name: bar
persistentVolumeClaim:
claimName: bar

resources:
requests:
memory: "12G"
Expand Down
3 changes: 3 additions & 0 deletions charts/sophora-server/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,9 @@ extraContainers: []
extraInitContainers: []
extraVolumeClaimTemplates: []

extraVolumes: []
extraVolumeMounts: []

sophora:
server:
ports:
Expand Down

0 comments on commit c5f3fd8

Please sign in to comment.