fix(matrix-synapse): add hostPath support
This commit is contained in:
parent
f1b62fb5ad
commit
4a4d7f86b4
6 changed files with 85 additions and 33 deletions
|
@ -4,7 +4,7 @@ name: matrix-synapse
|
|||
description: Matrix reference homeserver
|
||||
icon: https://matrix.org/images/matrix-logo.svg
|
||||
type: application
|
||||
version: 0.0.2
|
||||
version: 0.0.3
|
||||
# renovate: image=ghcr.io/element-hq/synapse
|
||||
appVersion: 1.101.0
|
||||
maintainers:
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
= matrix-synapse
|
||||
|
||||
image::https://img.shields.io/badge/Version-0.0.2-informational?style=flat-square[Version: 0.0.2]
|
||||
image::https://img.shields.io/badge/Version-0.0.3-informational?style=flat-square[Version: 0.0.3]
|
||||
image::https://img.shields.io/badge/Version-application-informational?style=flat-square[Type: application]
|
||||
image::https://img.shields.io/badge/AppVersion-1.101.0-informational?style=flat-square[AppVersion: 1.101.0]
|
||||
== Maintainers
|
||||
|
@ -237,16 +237,36 @@ helm uninstall matrix-synapse-release
|
|||
| `"ReadWriteOnce"`
|
||||
|
|
||||
|
||||
| persistence.annotations
|
||||
| object
|
||||
| `{}`
|
||||
|
|
||||
|
||||
| persistence.enabled
|
||||
| bool
|
||||
| `true`
|
||||
|
|
||||
|
||||
| persistence.existingClaim
|
||||
| string
|
||||
| `nil`
|
||||
| A manually managed Persistent Volume and Claim Requires persistence.enabled: true If defined, PVC must be created manually before volume will be bound
|
||||
|
||||
| persistence.hostPath
|
||||
| string
|
||||
| `nil`
|
||||
| Do not create an PVC, direct use hostPath in Pod
|
||||
|
||||
| persistence.size
|
||||
| string
|
||||
| `"10Gi"`
|
||||
|
|
||||
|
||||
| persistence.storageClass
|
||||
| string
|
||||
| `nil`
|
||||
| Persistent Volume Storage Class If defined, storageClassName: <storageClass> If set to "-", storageClassName: "", which disables dynamic provisioning If undefined (the default) or set to null, no storageClassName spec is set, choosing the default provisioner. (gp2 on AWS, standard on GKE, AWS & OpenStack)
|
||||
|
||||
| postgresql.auth.database
|
||||
| string
|
||||
| `"synapse"`
|
||||
|
|
|
@ -181,12 +181,20 @@ spec:
|
|||
{{- $mediaworker = ($config.enabled | default false) }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if and .Values.persistence.enabled (not $mediaworker) }}
|
||||
{{- if $mediaworker }}
|
||||
emptyDir: {}
|
||||
{{- else }}
|
||||
{{- if .Values.persistence.hostPath }}
|
||||
hostPath:
|
||||
type: Directory
|
||||
path: {{ .Values.persistence.hostPath | quote }}
|
||||
{{- else if .Values.persistence.enabled }}
|
||||
persistentVolumeClaim:
|
||||
claimName: {{ .Values.persistence.existingClaim | default (include "matrix-synapse.fullname" .) }}
|
||||
{{- else }}
|
||||
emptyDir: {}
|
||||
{{- end }}
|
||||
{{- end }}{{/* end-if hostPath+persistent*/}}
|
||||
{{- end }}{{/* end-if not $mediaworker */}}
|
||||
{{- with .Values.synapse.extraVolumes }}
|
||||
{{- . | toYaml | nindent 8 }}
|
||||
{{- end }}
|
||||
|
|
|
@ -1,22 +1,29 @@
|
|||
{{- if and .Values.persistence.enabled (not .Values.persistence.existingClaim) -}}
|
||||
{{- if and
|
||||
.Values.persistence.enabled
|
||||
(not .Values.persistence.existingClaim)
|
||||
(not .Values.persistence.hostPath)
|
||||
-}}
|
||||
kind: PersistentVolumeClaim
|
||||
apiVersion: v1
|
||||
metadata:
|
||||
name: {{ template "matrix-synapse.fullname" . }}
|
||||
labels:
|
||||
{{- include "matrix-synapse.labels" . | nindent 4 }}
|
||||
{{- with .Values.persistence.annotations }}
|
||||
annotations:
|
||||
{{ toYaml . | indent 4 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
accessModes:
|
||||
- {{ .Values.persistence.accessMode | quote }}
|
||||
resources:
|
||||
requests:
|
||||
storage: {{ .Values.persistence.size | quote }}
|
||||
{{- if .Values.persistence.storageClass }}
|
||||
{{- if (eq "-" .Values.persistence.storageClass) }}
|
||||
{{- with .Values.persistence.storageClass }}
|
||||
{{- if (eq "-" .) }}
|
||||
storageClassName: ""
|
||||
{{- else }}
|
||||
storageClassName: "{{ .Values.persistence.storageClass }}"
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- else }}
|
||||
storageClassName: {{ . | quote }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end -}}
|
||||
|
||||
|
|
|
@ -203,15 +203,19 @@ spec:
|
|||
emptyDir: {}
|
||||
{{- if eq $name "media-repository" }}
|
||||
- name: media
|
||||
{{- if $.Values.persistence.enabled }}
|
||||
{{- if $.Values.persistence.hostPath }}
|
||||
hostPath:
|
||||
type: Directory
|
||||
path: {{ .Values.persistence.hostPath | quote }}
|
||||
{{- else if $.Values.persistence.enabled }}
|
||||
persistentVolumeClaim:
|
||||
claimName: {{ $.Values.persistence.existingClaim | default (include "matrix-synapse.fullname" $) }}
|
||||
{{- else }}
|
||||
emptyDir: {}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}{{/* end-if media-repository */}}
|
||||
{{- with $config.volumes | default $default.volumes }}
|
||||
{{ . | toYaml | nindent 8 }}
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
|
|
@ -760,9 +760,22 @@ externalRedis:
|
|||
##
|
||||
persistence:
|
||||
enabled: true
|
||||
# existingClaim: synapse-data
|
||||
annotations: {}
|
||||
# -- Persistent Volume Storage Class
|
||||
# If defined, storageClassName: <storageClass>
|
||||
# If set to "-", storageClassName: "", which disables dynamic provisioning
|
||||
# If undefined (the default) or set to null, no storageClassName spec is
|
||||
# set, choosing the default provisioner. (gp2 on AWS, standard on
|
||||
# GKE, AWS & OpenStack)
|
||||
storageClass:
|
||||
|
||||
# storageClass: "-"
|
||||
# -- A manually managed Persistent Volume and Claim
|
||||
# Requires persistence.enabled: true
|
||||
# If defined, PVC must be created manually before volume will be bound
|
||||
existingClaim:
|
||||
|
||||
# -- Do not create an PVC, direct use hostPath in Pod
|
||||
hostPath:
|
||||
accessMode: ReadWriteOnce
|
||||
size: 10Gi
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue