mirror of
https://github.com/element-hq/ess-helm.git
synced 2026-01-11 20:06:45 +00:00
refactor extraVolumeAndMounts into 2 distinct macros
- Sidecar only have extraVolumeMounts - We need to split the jinja macro in 2 distinct macros to support this
This commit is contained in:
parent
68d24ce304
commit
06bcf5f939
11 changed files with 31 additions and 20 deletions
|
|
@ -439,7 +439,7 @@ networking:
|
|||
{{ key }}: {}
|
||||
{% endmacro %}
|
||||
|
||||
{% macro extraVolumesAndMounts(component, with_context=False) %}
|
||||
{% macro extraVolumes(component, with_context=False) %}
|
||||
# Extra volumes to mount in {{ component }}, as a yaml array
|
||||
# This supports helm templating
|
||||
{%- if with_context %}
|
||||
|
|
@ -448,7 +448,9 @@ networking:
|
|||
# Defaults to "both".
|
||||
{%- endif %}
|
||||
extraVolumes: []
|
||||
{% endmacro %}
|
||||
|
||||
{% macro extraVolumeMounts(component, with_context=False) %}
|
||||
# Extra volumes to mount in {{ component }}, as a yaml array
|
||||
{%- if with_context %}
|
||||
# For each extra volume mount, specify `mountContext` to `hook`, `runtime` or `both` to specify
|
||||
|
|
|
|||
|
|
@ -15,7 +15,8 @@ rbac:
|
|||
{{- sub_schema_values.workloadAnnotations() -}}
|
||||
{{- sub_schema_values.containersSecurityContext() -}}
|
||||
{{- sub_schema_values.extraEnv() -}}
|
||||
{{- sub_schema_values.extraVolumesAndMounts("Deployment Markers") }}
|
||||
{{- sub_schema_values.extraVolumes("Deployment Markers") }}
|
||||
{{- sub_schema_values.extraVolumeMounts("Deployment Markers") }}
|
||||
{{- sub_schema_values.nodeSelector() -}}
|
||||
{{- sub_schema_values.podSecurityContext(user_id='10010', group_id='10010') -}}
|
||||
{{- sub_schema_values.resources(requests_memory='50Mi', requests_cpu='50m', limits_memory='200Mi') -}}
|
||||
|
|
|
|||
|
|
@ -17,7 +17,8 @@ replicas: 1
|
|||
{{- sub_schema_values.labels() -}}
|
||||
{{- sub_schema_values.workloadAnnotations() -}}
|
||||
{{- sub_schema_values.extraEnv() -}}
|
||||
{{- sub_schema_values.extraVolumesAndMounts("Element Admin") }}
|
||||
{{- sub_schema_values.extraVolumes("Element Admin") }}
|
||||
{{- sub_schema_values.extraVolumeMounts("Element Admin") }}
|
||||
{{- sub_schema_values.containersSecurityContext() -}}
|
||||
{{- sub_schema_values.nodeSelector() -}}
|
||||
{{- sub_schema_values.podSecurityContext(user_id='10104', group_id='10104') -}}
|
||||
|
|
|
|||
|
|
@ -17,7 +17,8 @@ enabled: true
|
|||
## Most settings are configurable but some settings are owned by the chart and can't be overwritten
|
||||
additional: {}
|
||||
|
||||
{{- sub_schema_values.extraVolumesAndMounts("ElementWeb") }}
|
||||
{{- sub_schema_values.extraVolumes("Element Web") }}
|
||||
{{- sub_schema_values.extraVolumeMounts("Element Web") }}
|
||||
|
||||
# Number of Element Web replicas to start up
|
||||
replicas: 1
|
||||
|
|
|
|||
|
|
@ -13,7 +13,8 @@ replicas: 1
|
|||
{{- sub_schema_values.workloadAnnotations() }}
|
||||
{{- sub_schema_values.containersSecurityContext() }}
|
||||
{{- sub_schema_values.extraEnv() }}
|
||||
{{- sub_schema_values.extraVolumesAndMounts("HAProxy") }}
|
||||
{{- sub_schema_values.extraVolumes("HAProxy") }}
|
||||
{{- sub_schema_values.extraVolumeMounts("HAProxy") }}
|
||||
{{- sub_schema_values.nodeSelector() }}
|
||||
{{- sub_schema_values.podSecurityContext(user_id='10001', group_id='10001') }}
|
||||
{{- sub_schema_values.resources(requests_memory='100Mi', requests_cpu='100m', limits_memory='200Mi') }}
|
||||
|
|
|
|||
|
|
@ -15,7 +15,8 @@ rbac:
|
|||
{{- sub_schema_values.workloadAnnotations() -}}
|
||||
{{- sub_schema_values.containersSecurityContext() -}}
|
||||
{{- sub_schema_values.extraEnv() -}}
|
||||
{{- sub_schema_values.extraVolumesAndMounts("Init Secrets") }}
|
||||
{{- sub_schema_values.extraVolumes("Init Secrets") }}
|
||||
{{- sub_schema_values.extraVolumeMounts("Init Secrets") }}
|
||||
{{- sub_schema_values.nodeSelector() -}}
|
||||
{{- sub_schema_values.podSecurityContext(user_id='10010', group_id='10010') -}}
|
||||
{{- sub_schema_values.resources(requests_memory='50Mi', requests_cpu='50m', limits_memory='200Mi') -}}
|
||||
|
|
|
|||
|
|
@ -30,7 +30,8 @@ replicas: 1
|
|||
{{- sub_schema_values.containersSecurityContext() }}
|
||||
{{- sub_schema_values.hostAliases() }}
|
||||
{{- sub_schema_values.extraEnv() }}
|
||||
{{- sub_schema_values.extraVolumesAndMounts("Matrix RTC") }}
|
||||
{{- sub_schema_values.extraVolumes("Matrix RTC") }}
|
||||
{{- sub_schema_values.extraVolumeMounts("Matrix RTC") }}
|
||||
{{- sub_schema_values.nodeSelector() }}
|
||||
{{- sub_schema_values.podSecurityContext(user_id='10033', group_id='10033') }}
|
||||
{{- sub_schema_values.resources(requests_memory='20Mi', requests_cpu='50m', limits_memory='20Mi') }}
|
||||
|
|
@ -76,7 +77,8 @@ sfu:
|
|||
|
||||
{{- sub_schema_values.image(registry='docker.io', repository='livekit/livekit-server', tag='v1.9.1') | indent(2) }}
|
||||
{{- sub_schema_values.extraEnv() | indent(2) }}
|
||||
{{- sub_schema_values.extraVolumesAndMounts("Matrix RTC SFU") | indent(2) }}
|
||||
{{- sub_schema_values.extraVolumes("Matrix RTC SFU") | indent(2) }}
|
||||
{{- sub_schema_values.extraVolumeMounts("Matrix RTC SFU") | indent(2) }}
|
||||
{{- sub_schema_values.labels() | indent(2) }}
|
||||
{{- sub_schema_values.workloadAnnotations() | indent(2) }}
|
||||
{{- sub_schema_values.containersSecurityContext() | indent(2) }}
|
||||
|
|
|
|||
|
|
@ -39,7 +39,8 @@ privateKeys:
|
|||
{{ sub_schema_values.workloadAnnotations() }}
|
||||
{{ sub_schema_values.serviceMonitors() }}
|
||||
{{ sub_schema_values.extraEnv() }}
|
||||
{{ sub_schema_values.extraVolumesAndMounts("Matrix Authentication Service") }}
|
||||
{{ sub_schema_values.extraVolumes("Matrix Authentication Service") }}
|
||||
{{ sub_schema_values.extraVolumeMounts("Matrix Authentication Service") }}
|
||||
{{ sub_schema_values.probe("liveness") }}
|
||||
{{ sub_schema_values.probe("readiness") }}
|
||||
{{ sub_schema_values.probe("startup", failureThreshold=4) }}
|
||||
|
|
@ -70,7 +71,8 @@ syn2mas:
|
|||
{{- sub_schema_values.resources(requests_memory='50Mi', requests_cpu='50m', limits_memory='350Mi') | indent(2) -}}
|
||||
{{- sub_schema_values.serviceAccount() | indent(2) -}}
|
||||
{{- sub_schema_values.extraEnv() | indent(2) -}}
|
||||
{{- sub_schema_values.extraVolumesAndMounts("Syn2Mas") | indent(2) -}}
|
||||
{{- sub_schema_values.extraVolumes("Syn2Mas") | indent(2) -}}
|
||||
{{- sub_schema_values.extraVolumeMounts("Syn2Mas") | indent(2) -}}
|
||||
{{- sub_schema_values.tolerations() | indent(2) }}
|
||||
{{- sub_schema_values.topologySpreadConstraints() | indent(2) }}
|
||||
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ enabled: true
|
|||
postgresExporter:
|
||||
{{- sub_schema_values.image(registry='docker.io', repository='prometheuscommunity/postgres-exporter', tag='v0.18.1') | indent(2) }}
|
||||
{{- sub_schema_values.resources(requests_memory='10Mi', requests_cpu='10m', limits_memory='500Mi')| indent(2) }}
|
||||
{{- sub_schema_values.extraVolumesAndMounts("PostgresExporter") | indent(2) }}
|
||||
{{- sub_schema_values.extraVolumeMounts("PostgresExporter") | indent(2) }}
|
||||
{{- sub_schema_values.containersSecurityContext() | indent(2) }}
|
||||
{{- sub_schema_values.extraEnv() | indent(2) }}
|
||||
{{- sub_schema_values.probe("liveness", periodSeconds=6, timeoutSeconds=2) | indent(2) }}
|
||||
|
|
@ -25,7 +25,8 @@ essPasswords:
|
|||
{{- sub_schema_values.persistentVolumeClaim("storage") }}
|
||||
{{- sub_schema_values.image(registry='docker.io', repository='postgres', tag='17-alpine') }}
|
||||
{{- sub_schema_values.extraEnv() }}
|
||||
{{- sub_schema_values.extraVolumesAndMounts("Postgres") }}
|
||||
{{- sub_schema_values.extraVolumes("Postgres") }}
|
||||
{{- sub_schema_values.extraVolumeMounts("Postgres") }}
|
||||
{{- sub_schema_values.labels() }}
|
||||
{{- sub_schema_values.workloadAnnotations() }}
|
||||
{{- sub_schema_values.containersSecurityContext() }}
|
||||
|
|
|
|||
|
|
@ -86,7 +86,8 @@ logging:
|
|||
## synapse.util.caches.lrucache: WARNING
|
||||
levelOverrides: {}
|
||||
{{- sub_schema_values.image(registry='oci.element.io', repository='synapse', tag='v1.144.0-ess.2') }}
|
||||
{{- sub_schema_values.extraVolumesAndMounts("Synapse", with_context=true) }}
|
||||
{{- sub_schema_values.extraVolumes("Synapse", with_context=true) }}
|
||||
{{- sub_schema_values.extraVolumeMounts("Synapse", with_context=true) }}
|
||||
{{- sub_schema_values.ingress() }}
|
||||
{{- sub_schema_values.labels() }}
|
||||
{{- sub_schema_values.workloadAnnotations() }}
|
||||
|
|
@ -113,7 +114,8 @@ redis:
|
|||
{{- sub_schema_values.workloadAnnotations() | indent(2) }}
|
||||
{{- sub_schema_values.containersSecurityContext() | indent(2) }}
|
||||
{{- sub_schema_values.extraEnv() | indent(2) }}
|
||||
{{- sub_schema_values.extraVolumesAndMounts("Redis") | indent(2) }}
|
||||
{{- sub_schema_values.extraVolumes("Redis") | indent(2) }}
|
||||
{{- sub_schema_values.extraVolumeMounts("Redis") | indent(2) }}
|
||||
{{- sub_schema_values.nodeSelector() | indent(2) }}
|
||||
{{- sub_schema_values.podSecurityContext(user_id='10002', group_id='10002') | indent(2) }}
|
||||
{{- sub_schema_values.resources(requests_memory='50Mi', requests_cpu='50m', limits_memory='50Mi') | indent(2) }}
|
||||
|
|
|
|||
|
|
@ -1246,11 +1246,11 @@ elementWeb:
|
|||
## Full details on available configuration options can be found at https://github.com/element-hq/element-web/blob/develop/docs/config.md
|
||||
## Most settings are configurable but some settings are owned by the chart and can't be overwritten
|
||||
additional: {}
|
||||
# Extra volumes to mount in ElementWeb, as a yaml array
|
||||
# Extra volumes to mount in Element Web, as a yaml array
|
||||
# This supports helm templating
|
||||
extraVolumes: []
|
||||
|
||||
# Extra volumes to mount in ElementWeb, as a yaml array
|
||||
# Extra volumes to mount in Element Web, as a yaml array
|
||||
extraVolumeMounts: []
|
||||
|
||||
|
||||
|
|
@ -2055,6 +2055,7 @@ matrixAuthenticationService:
|
|||
# This supports helm templating
|
||||
extraVolumes: []
|
||||
|
||||
|
||||
# Extra volumes to mount in Matrix Authentication Service, as a yaml array
|
||||
extraVolumeMounts: []
|
||||
|
||||
|
|
@ -2341,10 +2342,6 @@ postgres:
|
|||
## Limits describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/
|
||||
limits:
|
||||
memory: 500Mi
|
||||
# Extra volumes to mount in PostgresExporter, as a yaml array
|
||||
# This supports helm templating
|
||||
extraVolumes: []
|
||||
|
||||
# Extra volumes to mount in PostgresExporter, as a yaml array
|
||||
extraVolumeMounts: []
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue