From 7df2c582ef353094bf89146f3568eb8abbbd76de Mon Sep 17 00:00:00 2001 From: Ben Banfield-Zanin Date: Fri, 13 Jun 2025 12:18:01 +0100 Subject: [PATCH] Document `extraEnv` in `values.yaml` for every workload. --- charts/matrix-stack/source/haproxy.yaml.j2 | 1 + charts/matrix-stack/source/matrix-rtc.yaml.j2 | 5 ++- .../matrixAuthenticationService.yaml.j2 | 1 + charts/matrix-stack/source/postgres.yaml.j2 | 3 +- charts/matrix-stack/values.yaml | 34 ++++++++++++++----- newsfragments/559.changed.md | 1 + 6 files changed, 33 insertions(+), 12 deletions(-) create mode 100644 newsfragments/559.changed.md diff --git a/charts/matrix-stack/source/haproxy.yaml.j2 b/charts/matrix-stack/source/haproxy.yaml.j2 index 4bed4cf2..f125b049 100644 --- a/charts/matrix-stack/source/haproxy.yaml.j2 +++ b/charts/matrix-stack/source/haproxy.yaml.j2 @@ -11,6 +11,7 @@ replicas: 1 {{- sub_schema_values.labels() }} {{- sub_schema_values.workloadAnnotations() }} {{- sub_schema_values.containersSecurityContext() }} +{{- sub_schema_values.extraEnv() }} {{- 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') }} diff --git a/charts/matrix-stack/source/matrix-rtc.yaml.j2 b/charts/matrix-stack/source/matrix-rtc.yaml.j2 index 40b542d6..f3eb60d9 100644 --- a/charts/matrix-stack/source/matrix-rtc.yaml.j2 +++ b/charts/matrix-stack/source/matrix-rtc.yaml.j2 @@ -17,14 +17,13 @@ enabled: true {#- We set `initSecret=false` because we are describing the mechanism in the comment parameter #} {{- sub_schema_values.credential("The secret for the LiveKit SFU.\n## This is required if `sfu.enabled` and `keysYaml` is not used. It will be generated by the `initSecrets` job if it is empty", "secret", initIfAbsent=False, commented=True) | indent(2) }} -{{- sub_schema_values.ingress() -}} -{{- sub_schema_values.extraEnv() }} - replicas: 1 +{{- sub_schema_values.ingress() }} {{- sub_schema_values.image(registry='ghcr.io', repository='element-hq/lk-jwt-service', tag='0.2.3') }} {{- sub_schema_values.labels() }} {{- sub_schema_values.workloadAnnotations() }} {{- sub_schema_values.containersSecurityContext() }} +{{- sub_schema_values.extraEnv() }} {{- 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') }} diff --git a/charts/matrix-stack/source/matrixAuthenticationService.yaml.j2 b/charts/matrix-stack/source/matrixAuthenticationService.yaml.j2 index d308712c..26d70ce9 100644 --- a/charts/matrix-stack/source/matrixAuthenticationService.yaml.j2 +++ b/charts/matrix-stack/source/matrixAuthenticationService.yaml.j2 @@ -68,6 +68,7 @@ syn2mas: {{- sub_schema_values.podSecurityContext(user_id='10005', group_id='10005') | indent(2) -}} {{- 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.tolerations() | indent(2) }} ## Runs the syn2mas process in dryRun mode. diff --git a/charts/matrix-stack/source/postgres.yaml.j2 b/charts/matrix-stack/source/postgres.yaml.j2 index fe5c6924..67b34303 100644 --- a/charts/matrix-stack/source/postgres.yaml.j2 +++ b/charts/matrix-stack/source/postgres.yaml.j2 @@ -8,7 +8,8 @@ enabled: true postgresExporter: {{- sub_schema_values.image(registry='docker.io', repository='prometheuscommunity/postgres-exporter', tag='v0.17.0') | indent(2) }} {{- sub_schema_values.resources(requests_memory='10Mi', requests_cpu='10m', limits_memory='500Mi')| indent(2) }} - {{- sub_schema_values.containersSecurityContext()| 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) }} {{- sub_schema_values.probe("readiness", periodSeconds=2, successThreshold=2, timeoutSeconds=2) | indent(2) }} {{- sub_schema_values.probe("startup", failureThreshold=20, periodSeconds=2) | indent(2) }} diff --git a/charts/matrix-stack/values.yaml b/charts/matrix-stack/values.yaml index 44e530d8..cca8f01e 100644 --- a/charts/matrix-stack/values.yaml +++ b/charts/matrix-stack/values.yaml @@ -395,6 +395,8 @@ matrixRTC: ## secret: existing-secret ## secretKey: key-in-secret # secret: {} + + replicas: 1 ## How this ingress should be constructed ingress: ## What hostname should be used for this Ingress @@ -417,14 +419,6 @@ matrixRTC: ## If set, some tweaks will be applied automatically to ingresses based on the controller type here. ## This can be set to `ingress-nginx`. # controllerType: - ## Defines additional environment variables to be injected onto this workload - ## e.g. - ## extraEnv: - ## - name: FOO - ## value: "bar" - extraEnv: [] - - replicas: 1 # Details of the image to be used image: ## The host and (optional) port of the container image registry for this component. @@ -478,6 +472,12 @@ matrixRTC: ## localhostProfile must only be set set if type Localhost. It indicates the path of the pre-configured profile on the node, relative to the kubelet's configured Seccomp profile location (configured with the --root-dir flag). # seccompProfile: # type: RuntimeDefault + ## Defines additional environment variables to be injected onto this workload + ## e.g. + ## extraEnv: + ## - name: FOO + ## value: "bar" + extraEnv: [] ## NodeSelector is a selector which must be true for the pod to fit on a node. Selector which must match a node's labels for the pod to be scheduled on that node. More info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/ # nodeSelector: {} ## A subset of PodSecurityContext. PodSecurityContext holds pod-level security attributes and common container settings @@ -1181,6 +1181,12 @@ haproxy: ## localhostProfile must only be set set if type Localhost. It indicates the path of the pre-configured profile on the node, relative to the kubelet's configured Seccomp profile location (configured with the --root-dir flag). # seccompProfile: # type: RuntimeDefault + ## Defines additional environment variables to be injected onto this workload + ## e.g. + ## extraEnv: + ## - name: FOO + ## value: "bar" + extraEnv: [] ## NodeSelector is a selector which must be true for the pod to fit on a node. Selector which must match a node's labels for the pod to be scheduled on that node. More info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/ # nodeSelector: {} ## A subset of PodSecurityContext. PodSecurityContext holds pod-level security attributes and common container settings @@ -1883,6 +1889,12 @@ matrixAuthenticationService: ## Annotations to add to the service account annotations: {} + ## Defines additional environment variables to be injected onto this workload + ## e.g. + ## extraEnv: + ## - name: FOO + ## value: "bar" + extraEnv: [] ## Workload tolerations allows Pods that are part of this (sub)component to 'tolerate' any taint that matches the triple using the matching operator . ## ## * effect indicates the taint effect to match. Empty means match all taint effects. When specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute. @@ -1969,6 +1981,12 @@ postgres: ## localhostProfile must only be set set if type Localhost. It indicates the path of the pre-configured profile on the node, relative to the kubelet's configured Seccomp profile location (configured with the --root-dir flag). # seccompProfile: # type: RuntimeDefault + ## Defines additional environment variables to be injected onto this workload + ## e.g. + ## extraEnv: + ## - name: FOO + ## value: "bar" + extraEnv: [] ## Configuration of the thresholds and frequencies of the livenessProbe livenessProbe: ## How many consecutive failures for the probe to be considered failed diff --git a/newsfragments/559.changed.md b/newsfragments/559.changed.md new file mode 100644 index 00000000..8cecd2a4 --- /dev/null +++ b/newsfragments/559.changed.md @@ -0,0 +1 @@ +Document `extraEnv` in `values.yaml` for every workload.