perf: 更新 persistence

This commit is contained in:
吴小白
2022-05-26 13:54:08 +08:00
parent 277dafc47d
commit 495a280986
9 changed files with 82 additions and 1 deletions

View File

@@ -89,8 +89,14 @@ spec:
subPath: "config.yml"
- mountPath: "/opt/jumpserver/data"
name: "jms-core-data"
{{- if .persistence.subPath }}
subPath: {{ .persistence.subPath | quote }}
{{- end }}
- mountPath: "/opt/jumpserver/logs"
name: "jms-core-logs"
{{- if .persistence.subPath }}
subPath: {{ .persistence.subPath | quote }}
{{- end }}
{{- with .volumeMounts }}
{{- toYaml . | nindent 12 }}
{{- end }}
@@ -100,7 +106,11 @@ spec:
name: '{{ include "jumpserver.fullname" $ }}-jms-core'
name: "jms-core-config"
- persistentVolumeClaim:
{{- if .persistence.existingClaim }}
claimName: {{ .persistence.existingClaim | quote }}
{{- else }}
claimName: '{{ include "jumpserver.fullname" $ }}-jms-core-data'
{{- end }}
name: "jms-core-data"
- persistentVolumeClaim:
claimName: '{{ include "jumpserver.fullname" $ }}-jms-core-logs'

View File

@@ -96,8 +96,14 @@ spec:
subPath: "config.yml"
- mountPath: "/opt/jumpserver/data"
name: "jms-core-data"
{{- if .persistence.subPath }}
subPath: {{ .persistence.subPath | quote }}
{{- end }}
- mountPath: "/opt/jumpserver/logs"
name: "jms-core-logs"
{{- if .persistence.subPath }}
subPath: {{ .persistence.subPath | quote }}
{{- end }}
{{- with .volumeMounts }}
{{- toYaml . | nindent 12 }}
{{- end }}
@@ -107,7 +113,11 @@ spec:
name: '{{ include "jumpserver.fullname" $ }}-jms-core'
name: "jms-core-config"
- persistentVolumeClaim:
{{- if .persistence.existingClaim }}
claimName: {{ .persistence.existingClaim | quote }}
{{- else }}
claimName: '{{ include "jumpserver.fullname" $ }}-jms-core-data'
{{- end }}
name: "jms-core-data"
- persistentVolumeClaim:
claimName: '{{ include "jumpserver.fullname" $ }}-jms-core-logs'

View File

@@ -82,13 +82,20 @@ spec:
volumeMounts:
- mountPath: "/opt/koko/data"
name: "jms-koko-data"
{{- if .persistence.subPath }}
subPath: {{ .persistence.subPath | quote }}
{{- end }}
{{- with .volumeMounts }}
{{- toYaml . | nindent 12 }}
{{- end }}
restartPolicy: Always
volumes:
- persistentVolumeClaim:
{{- if .persistence.existingClaim }}
claimName: {{ .persistence.existingClaim | quote }}
{{- else }}
claimName: '{{ include "jumpserver.fullname" $ }}-jms-koko-data'
{{- end }}
name: "jms-koko-data"
{{- with .volumes }}
{{- tpl (toYaml .) $ | nindent 8 }}

View File

@@ -75,13 +75,20 @@ spec:
volumeMounts:
- mountPath: "/opt/lion/data"
name: "jms-lion-data"
{{- if .persistence.subPath }}
subPath: {{ .persistence.subPath | quote }}
{{- end }}
{{- with .volumeMounts }}
{{- toYaml . | nindent 12 }}
{{- end }}
restartPolicy: Always
volumes:
- persistentVolumeClaim:
{{- if .persistence.existingClaim }}
claimName: {{ .persistence.existingClaim | quote }}
{{- else }}
claimName: '{{ include "jumpserver.fullname" $ }}-jms-lion-data'
{{- end }}
name: "jms-lion-data"
{{- with .volumes }}
{{- tpl (toYaml .) $ | nindent 8 }}

View File

@@ -73,13 +73,20 @@ spec:
volumeMounts:
- mountPath: "/opt/magnus/data"
name: "jms-magnus-data"
{{- if .persistence.subPath }}
subPath: {{ .persistence.subPath | quote }}
{{- end }}
{{- with .volumeMounts }}
{{- toYaml . | nindent 12 }}
{{- end }}
restartPolicy: Always
volumes:
- persistentVolumeClaim:
{{- if .persistence.existingClaim }}
claimName: {{ .persistence.existingClaim | quote }}
{{- else }}
claimName: '{{ include "jumpserver.fullname" $ }}-jms-magnus-data'
{{- end }}
name: "jms-magnus-data"
{{- with .volumes }}
{{- tpl (toYaml .) $ | nindent 8 }}

View File

@@ -67,13 +67,20 @@ spec:
volumeMounts:
- mountPath: "/opt/omnidb/data"
name: "jms-omnidb-data"
{{- if .persistence.subPath }}
subPath: {{ .persistence.subPath | quote }}
{{- end }}
{{- with .volumeMounts }}
{{- toYaml . | nindent 12 }}
{{- end }}
restartPolicy: Always
volumes:
- persistentVolumeClaim:
{{- if .persistence.existingClaim }}
claimName: {{ .persistence.existingClaim | quote }}
{{- else }}
claimName: '{{ include "jumpserver.fullname" $ }}-jms-omnidb-data'
{{- end }}
name: "jms-omnidb-data"
{{- with .volumes }}
{{- tpl (toYaml .) $ | nindent 8 }}

View File

@@ -62,8 +62,14 @@ spec:
subPath: "default.conf"
- mountPath: "/opt/jumpserver/data"
name: "jms-core-data"
{{- if $.Values.core.persistence.subPath }}
subPath: {{ $.Values.core.persistence.subPath | quote }}
{{- end }}
- mountPath: "/var/log/nginx"
name: "jms-web-logs"
{{- if .persistence.subPath }}
subPath: {{ .persistence.subPath | quote }}
{{- end }}
{{- with .volumeMounts }}
{{- toYaml . | nindent 12 }}
{{- end }}
@@ -73,10 +79,18 @@ spec:
name: '{{ include "jumpserver.fullname" $ }}-jms-web'
name: "jms-web-config"
- persistentVolumeClaim:
{{- if $.Values.core.persistence.existingClaim }}
claimName: {{ $.Values.core.persistence.existingClaim | quote }}
{{- else }}
claimName: '{{ include "jumpserver.fullname" $ }}-jms-core-data'
{{- end }}
name: "jms-core-data"
- persistentVolumeClaim:
{{- if .persistence.existingClaim }}
claimName: {{ .persistence.existingClaim | quote }}
{{- else }}
claimName: '{{ include "jumpserver.fullname" $ }}-jms-web-logs'
{{- end }}
name: "jms-web-logs"
{{- with .volumes }}
{{- tpl (toYaml .) $ | nindent 8 }}

View File

@@ -67,13 +67,20 @@ spec:
volumeMounts:
- mountPath: "/opt/xrdp/data"
name: "jms-xrdp-data"
{{- if .persistence.subPath }}
subPath: {{ .persistence.subPath | quote }}
{{- end }}
{{- with .volumeMounts }}
{{- toYaml . | nindent 12 }}
{{- end }}
restartPolicy: Always
volumes:
- persistentVolumeClaim:
{{- if .persistence.existingClaim }}
claimName: {{ .persistence.existingClaim | quote }}
{{- else }}
claimName: '{{ include "jumpserver.fullname" $ }}-jms-xrdp-data'
{{- end }}
name: "jms-xrdp-data"
{{- with .volumes }}
{{- tpl (toYaml .) $ | nindent 8 }}

View File

@@ -147,7 +147,7 @@ core:
finalizers:
- kubernetes.io/pvc-protection
# subPath: ""
# existingClaim:
# existingClaim: ""
volumeMounts: []
@@ -237,6 +237,8 @@ koko:
# annotations: {}
finalizers:
- kubernetes.io/pvc-protection
# subPath: ""
# existingClaim: ""
volumeMounts: []
@@ -326,6 +328,8 @@ lion:
# annotations: {}
finalizers:
- kubernetes.io/pvc-protection
# subPath: ""
# existingClaim: ""
volumeMounts: []
@@ -409,6 +413,8 @@ magnus:
# annotations: {}
finalizers:
- kubernetes.io/pvc-protection
# subPath: ""
# existingClaim: ""
volumeMounts: []
@@ -489,6 +495,8 @@ omnidb:
# annotations: {}
finalizers:
- kubernetes.io/pvc-protection
# subPath: ""
# existingClaim: ""
volumeMounts: []
@@ -575,6 +583,8 @@ xrdp:
# annotations: {}
finalizers:
- kubernetes.io/pvc-protection
# subPath: ""
# existingClaim: ""
volumeMounts: []
@@ -654,6 +664,8 @@ web:
# annotations: {}
finalizers:
- kubernetes.io/pvc-protection
# subPath: ""
# existingClaim: ""
volumeMounts: []