Skip to content

Commit

Permalink
[sophora-server] add extraVolumes and extraVolumeMounts
Browse files Browse the repository at this point in the history
See ZUPUS-328
  • Loading branch information
Sven Schliesing committed Sep 10, 2024
1 parent 8aa6385 commit 1580f56
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 1 deletion.
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 1580f56

Please sign in to comment.