From 2ef28ccffb25e26c023e275bfafa8a54eeeb74d4 Mon Sep 17 00:00:00 2001 From: Ben Banfield-Zanin Date: Mon, 10 Feb 2025 10:41:09 +0000 Subject: [PATCH] Generate CI values files from fragments --- README.md | 34 +++++++- .../ci/element-web-checkov-values.yaml | 20 +---- .../ci/element-web-minimal-values.yaml | 9 +- ...ple-default-enabled-components-values.yaml | 27 +++--- .../ci/fragments/element-web-checkov.yaml | 9 ++ .../ci/fragments/element-web-minimal.yaml | 8 ++ .../fragments/element-web-pytest-extras.yaml | 33 ++++++++ .../ci/fragments/haproxy-checkov.yaml | 9 ++ .../ci/fragments/init-secrets-checkov.yaml | 10 +++ .../ci/fragments/init-secrets-minimal.yaml | 6 ++ .../fragments/init-secrets-pytest-extras.yaml | 7 ++ ...matrix-authentication-service-checkov.yaml | 9 ++ ...thentication-service-external-synapse.yaml | 16 ++++ ...matrix-authentication-service-minimal.yaml | 9 ++ ...-authentication-service-pytest-extras.yaml | 25 ++++++ ...-authentication-service-test-postgres.yaml | 12 +++ .../synapse-all-workers-running.yaml | 44 ++++++++++ .../ci/fragments/synapse-checkov.yaml | 15 ++++ .../synapse-ingress-additional-paths.yaml | 23 +++++ .../ci/fragments/synapse-minimal.yaml | 17 ++++ .../ci/fragments/synapse-pytest-extras.yaml | 43 ++++++++++ .../synapse-some-workers-running.yaml | 14 ++++ .../ci/fragments/synapse-test-postgres.yaml | 12 +++ .../ci/fragments/well-known-minimal.yaml | 8 ++ .../fragments/well-known-pytest-extras.yaml | 13 +++ .../ci/init-secrets-checkov-values.yaml | 9 +- .../ci/init-secrets-minimal-values.yaml | 9 +- ...authentication-service-checkov-values.yaml | 20 ++--- ...ation-service-external-synapse-values.yaml | 42 ++-------- ...authentication-service-minimal-values.yaml | 22 ++--- .../ci/pytest-element-web-values.yaml | 42 ++++------ ...-matrix-authentication-service-values.yaml | 83 +++++++++---------- .../ci/pytest-synapse-values.yaml | 48 +++++------ .../ci/pytest-well-known-values.yaml | 24 +++--- .../ci/synapse-additonal-settings-values.yaml | 41 --------- .../synapse-checkov-with-workers-values.yaml | 48 +++++------ ...napse-ingress-additional-paths-values.yaml | 52 +++++------- .../ci/synapse-minimal-values.yaml | 17 ++-- .../ci/synapse-worker-example-values.yaml | 24 ++---- .../ci/well-known-checkov-values.yaml | 14 ++-- .../ci/well-known-mas-values.yaml | 41 ++------- .../ci/well-known-minimal-values.yaml | 12 ++- .../ci/well-known-synapse-mas-values.yaml | 46 ++-------- .../ci/well-known-synapse-values.yaml | 21 ++--- newsfragments/159.internal.md | 1 + 45 files changed, 604 insertions(+), 444 deletions(-) create mode 100644 charts/matrix-stack/ci/fragments/element-web-checkov.yaml create mode 100644 charts/matrix-stack/ci/fragments/element-web-minimal.yaml create mode 100644 charts/matrix-stack/ci/fragments/element-web-pytest-extras.yaml create mode 100644 charts/matrix-stack/ci/fragments/haproxy-checkov.yaml create mode 100644 charts/matrix-stack/ci/fragments/init-secrets-checkov.yaml create mode 100644 charts/matrix-stack/ci/fragments/init-secrets-minimal.yaml create mode 100644 charts/matrix-stack/ci/fragments/init-secrets-pytest-extras.yaml create mode 100644 charts/matrix-stack/ci/fragments/matrix-authentication-service-checkov.yaml create mode 100644 charts/matrix-stack/ci/fragments/matrix-authentication-service-external-synapse.yaml create mode 100644 charts/matrix-stack/ci/fragments/matrix-authentication-service-minimal.yaml create mode 100644 charts/matrix-stack/ci/fragments/matrix-authentication-service-pytest-extras.yaml create mode 100644 charts/matrix-stack/ci/fragments/matrix-authentication-service-test-postgres.yaml create mode 100644 charts/matrix-stack/ci/fragments/synapse-all-workers-running.yaml create mode 100644 charts/matrix-stack/ci/fragments/synapse-checkov.yaml create mode 100644 charts/matrix-stack/ci/fragments/synapse-ingress-additional-paths.yaml create mode 100644 charts/matrix-stack/ci/fragments/synapse-minimal.yaml create mode 100644 charts/matrix-stack/ci/fragments/synapse-pytest-extras.yaml create mode 100644 charts/matrix-stack/ci/fragments/synapse-some-workers-running.yaml create mode 100644 charts/matrix-stack/ci/fragments/synapse-test-postgres.yaml create mode 100644 charts/matrix-stack/ci/fragments/well-known-minimal.yaml create mode 100644 charts/matrix-stack/ci/fragments/well-known-pytest-extras.yaml delete mode 100644 charts/matrix-stack/ci/synapse-additonal-settings-values.yaml create mode 100644 newsfragments/159.internal.md diff --git a/README.md b/README.md index 69130a14..c40314aa 100644 --- a/README.md +++ b/README.md @@ -44,6 +44,33 @@ Similarly the version number of the chart can be changed with `scripts/set_chart_version.sh `. Any changes this makes must be committed to Git as well. +The various test values files in `charts/matrix-stack/ci` are also mostly assembled from +fragments. The fragments live in the `fragments` sub-directory. An assembled values file +is annotated with a `# source_fragments: ` +comment. `scripts/assemble_ci_values_files_from_fragments.sh` is then run to regenerate +the values file from fragments. The listed fragments are combined with +`nothing-enabled-values.yaml` such that no default-enabled components are configured. + +For each component there must be a values file named +* `-minimal-values.yaml` - this should contain the absolute minimal values + required to get a working instance of the component. Any credentials should be + generated if possible +* `-checkov-values.yaml` - this should contain the minimal values to get + checkov to pass on a working instance of the component +* If the component has credentials the following values are also required: + * `-secrets-in-helm-values.yaml` - where any credentials are provided in + the values file itself. The credential values themselves are not important + * `-secrets-externally-values.yaml` - where the values file contains + details of `Secret`s that could contain the credentials. The `Secret` name + should include `{{ $.Release.Name }}` to prove the field is templatable. The + exact `Secret` name and key themselves are otherwise not important + +Other values may exist for a component to demonstrate and test some interesting +configuration and resulting templates. + +Assembly of values files from fragments is optional and opt-in but it is strongly +recommended. + ### Running a test cluster A test cluster can be constructed with `./scripts/setup_test_cluster.sh`. It will: @@ -95,13 +122,13 @@ From the project root: `ct lint` This will test the chart with all values files matching `charts/matrix-stack/ci/*-values.yaml`. -From a sub-chart directory: `ct lint --charts . --validate-maintainers=false` +From the `matrix-stack` directory: `ct lint --charts . --validate-maintainers=false` ### checkov Detects misconfigurations and lack of hardening in the manifests. -From `charts/matrix-stack`: `checkov -d . --framework helm --quiet --var-file ci/` +From `charts/matrix-stack`: `HELM_NAMESPACE=ess checkov -d . --framework helm --quiet --var-file ci/` Other values files can be used but the values files named `checkovvalues.yaml` will have any test suppression annotations required. @@ -158,7 +185,8 @@ We are not going to expose every single application configuration option. The chart changelog is built using towncrier. Every PR requires a newsfragment created using : `towncrier create`. The fragment number should match the PR number. -Each newsfragment accepts on type of artifct hub kind changes : `added`, `changed`, `removed`, `fixed`, `security`. +Each newsfragment accepts on type of ArtifactHub kind changes : `added`, `changed`, `removed`, `fixed`, `security`. The `internal` type +is accepted but will not be shown in ArtifactHub. The changelog is built on release time using `towncrier build` in the chart directory. The changelog is also injected into the `Chart.yaml` under the annotation `artifacthub.io/changes`. diff --git a/charts/matrix-stack/ci/element-web-checkov-values.yaml b/charts/matrix-stack/ci/element-web-checkov-values.yaml index 350bfa8c..2302c69c 100644 --- a/charts/matrix-stack/ci/element-web-checkov-values.yaml +++ b/charts/matrix-stack/ci/element-web-checkov-values.yaml @@ -1,34 +1,22 @@ -# Copyright 2024 New Vector Ltd +# Copyright 2024-2025 New Vector Ltd # # SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial - -serverName: ess.localhost +# +# source_fragments: element-web-minimal.yaml element-web-checkov.yaml +# DO NOT EDIT DIRECTLY. Edit the fragment files to add / modify / remove values initSecrets: enabled: false - elementWeb: - additional: { - "default_server_config": { - "m.homeserver": { - "base_url": "https://element.ess.localhost", - } - }, - } - ingress: host: element.ess.localhost - annotations: checkov.io/skip1: CKV_K8S_11=We deliberately don't set CPU limits. Pod is BestEffort not Guaranteed checkov.io/skip2: CKV_K8S_43=No digests checkov.io/skip3: CKV2_K8S_6=No network policy yet - matrixAuthenticationService: enabled: false - synapse: enabled: false - wellKnownDelegation: enabled: false diff --git a/charts/matrix-stack/ci/element-web-minimal-values.yaml b/charts/matrix-stack/ci/element-web-minimal-values.yaml index 4db933f5..d560d2d5 100644 --- a/charts/matrix-stack/ci/element-web-minimal-values.yaml +++ b/charts/matrix-stack/ci/element-web-minimal-values.yaml @@ -1,19 +1,18 @@ -# Copyright 2024 New Vector Ltd +# Copyright 2024-2025 New Vector Ltd # # SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +# +# source_fragments: element-web-minimal.yaml +# DO NOT EDIT DIRECTLY. Edit the fragment files to add / modify / remove values initSecrets: enabled: false - elementWeb: ingress: host: element.ess.localhost - matrixAuthenticationService: enabled: false - synapse: enabled: false - wellKnownDelegation: enabled: false diff --git a/charts/matrix-stack/ci/example-default-enabled-components-values.yaml b/charts/matrix-stack/ci/example-default-enabled-components-values.yaml index eb379e49..7a29063a 100644 --- a/charts/matrix-stack/ci/example-default-enabled-components-values.yaml +++ b/charts/matrix-stack/ci/example-default-enabled-components-values.yaml @@ -1,38 +1,30 @@ -# Copyright 2024 New Vector Ltd +# Copyright 2024-2025 New Vector Ltd # # SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +# +# source_fragments: element-web-minimal.yaml synapse-minimal.yaml synapse-test-postgres.yaml matrix-authentication-service-minimal.yaml matrix-authentication-service-test-postgres.yaml init-secrets-minimal.yaml well-known-minimal.yaml +# DO NOT EDIT DIRECTLY. Edit the fragment files to add / modify / remove values -## Values file containing minimal values for components that are enabled by default only - -serverName: ess.localhost - +initSecrets: + enabled: true elementWeb: ingress: host: element.ess.localhost - matrixAuthenticationService: ingress: host: mas.ess.localhost - postgres: - host: ess-postgres - user: mas_user + host: postgres + user: mas database: mas password: secret: ess-postgres secretKey: password - synapse: ingress: host: synapse.ess.localhost - registrationSharedSecret: value: CHANGEME-ooWo6jeidahhei3Hae0eer9U - macaroon: - value: CHANGEME-eek3Eigoh8ux8laeTingeej1 - signingKey: - value: ed25519 0 bNQOzBUDszff7Ax81z6w0uZ1IPWoxYaazT7emaZEfpw - postgres: host: ess-postgres user: synapse_user @@ -40,3 +32,6 @@ synapse: password: secret: ess-postgres secretKey: password +wellKnownDelegation: + enabled: true +serverName: ess.localhost diff --git a/charts/matrix-stack/ci/fragments/element-web-checkov.yaml b/charts/matrix-stack/ci/fragments/element-web-checkov.yaml new file mode 100644 index 00000000..029419eb --- /dev/null +++ b/charts/matrix-stack/ci/fragments/element-web-checkov.yaml @@ -0,0 +1,9 @@ +# Copyright 2025 New Vector Ltd +# +# SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial + +elementWeb: + annotations: + checkov.io/skip1: CKV_K8S_11=We deliberately don't set CPU limits. Pod is BestEffort not Guaranteed + checkov.io/skip2: CKV_K8S_43=No digests + checkov.io/skip3: CKV2_K8S_6=No network policy yet diff --git a/charts/matrix-stack/ci/fragments/element-web-minimal.yaml b/charts/matrix-stack/ci/fragments/element-web-minimal.yaml new file mode 100644 index 00000000..0700eaf6 --- /dev/null +++ b/charts/matrix-stack/ci/fragments/element-web-minimal.yaml @@ -0,0 +1,8 @@ +# Copyright 2025 New Vector Ltd +# +# SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial + +elementWeb: + enabled: true + ingress: + host: element.ess.localhost diff --git a/charts/matrix-stack/ci/fragments/element-web-pytest-extras.yaml b/charts/matrix-stack/ci/fragments/element-web-pytest-extras.yaml new file mode 100644 index 00000000..8ffb8ed4 --- /dev/null +++ b/charts/matrix-stack/ci/fragments/element-web-pytest-extras.yaml @@ -0,0 +1,33 @@ +# Copyright 2025 New Vector Ltd +# +# SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial + +serverName: ess.localhost + +elementWeb: + ingress: + host: element.{{ $.Values.serverName }} + tlsSecret: "{{ $.Release.Name }}-element-web-tls" + + replicas: 1 + + annotations: + has-no-service-monitor: "true" + + additional: + { + "default_server_config": { + "m.homeserver": { + "base_url": "https://synapse.{{ $.Values.serverName }}", + } + }, + "element_call": + {"url": "https://call.{{ $.Values.serverName }}", "use_exclusively": true}, + "features": + { + "feature_video_rooms": true, + "feature_group_calls": true, + "feature_new_room_decoration_ui": true, + "feature_element_call_video_rooms": true, + }, + } diff --git a/charts/matrix-stack/ci/fragments/haproxy-checkov.yaml b/charts/matrix-stack/ci/fragments/haproxy-checkov.yaml new file mode 100644 index 00000000..5a069923 --- /dev/null +++ b/charts/matrix-stack/ci/fragments/haproxy-checkov.yaml @@ -0,0 +1,9 @@ +# Copyright 2025 New Vector Ltd +# +# SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial + +haproxy: + annotations: + checkov.io/skip1: CKV_K8S_11=We deliberately don't set CPU limits. Pod is BestEffort not Guaranteed + checkov.io/skip2: CKV_K8S_43=No digests + checkov.io/skip3: CKV2_K8S_6=No network policy yet diff --git a/charts/matrix-stack/ci/fragments/init-secrets-checkov.yaml b/charts/matrix-stack/ci/fragments/init-secrets-checkov.yaml new file mode 100644 index 00000000..78808785 --- /dev/null +++ b/charts/matrix-stack/ci/fragments/init-secrets-checkov.yaml @@ -0,0 +1,10 @@ +# Copyright 2025 New Vector Ltd +# +# SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial + +initSecrets: + annotations: + checkov.io/skip1: CKV_K8S_11=We deliberately don't set CPU limits. Pod is BestEffort not Guaranteed + checkov.io/skip2: CKV_K8S_43=No digests + checkov.io/skip3: CKV2_K8S_6=No network policy yet + checkov.io/skip4: CKV_K8S_38=The job needs a service account diff --git a/charts/matrix-stack/ci/fragments/init-secrets-minimal.yaml b/charts/matrix-stack/ci/fragments/init-secrets-minimal.yaml new file mode 100644 index 00000000..2016f6d8 --- /dev/null +++ b/charts/matrix-stack/ci/fragments/init-secrets-minimal.yaml @@ -0,0 +1,6 @@ +# Copyright 2025 New Vector Ltd +# +# SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial + +initSecrets: + enabled: true diff --git a/charts/matrix-stack/ci/fragments/init-secrets-pytest-extras.yaml b/charts/matrix-stack/ci/fragments/init-secrets-pytest-extras.yaml new file mode 100644 index 00000000..ae026a9a --- /dev/null +++ b/charts/matrix-stack/ci/fragments/init-secrets-pytest-extras.yaml @@ -0,0 +1,7 @@ +# Copyright 2025 New Vector Ltd +# +# SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial + +initSecrets: + annotations: + has-no-service-monitor: "true" diff --git a/charts/matrix-stack/ci/fragments/matrix-authentication-service-checkov.yaml b/charts/matrix-stack/ci/fragments/matrix-authentication-service-checkov.yaml new file mode 100644 index 00000000..1ad28eef --- /dev/null +++ b/charts/matrix-stack/ci/fragments/matrix-authentication-service-checkov.yaml @@ -0,0 +1,9 @@ +# Copyright 2025 New Vector Ltd +# +# SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial + +matrixAuthenticationService: + annotations: + checkov.io/skip1: CKV_K8S_11=We deliberately don't set CPU limits. Pod is BestEffort not Guaranteed + checkov.io/skip2: CKV_K8S_43=No digests + checkov.io/skip3: CKV2_K8S_6=No network policy yet diff --git a/charts/matrix-stack/ci/fragments/matrix-authentication-service-external-synapse.yaml b/charts/matrix-stack/ci/fragments/matrix-authentication-service-external-synapse.yaml new file mode 100644 index 00000000..84f71f8b --- /dev/null +++ b/charts/matrix-stack/ci/fragments/matrix-authentication-service-external-synapse.yaml @@ -0,0 +1,16 @@ +# Copyright 2025 New Vector Ltd +# +# SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial + +matrixAuthenticationService: + additional: + 0000-matrix-server: + config: | + clients: + - client_id: "0000000000000000000SYNAPSE" + client_auth_method: client_secret_basic + client_secret: CHANGEME-eiv6wae8shooPhie4ief8ru2egahbah0 + matrix: + homeserver: "external.localhost + secret: jaix6Am9Shut7zeiduu7ua5maengag3o + endpoint: https://syn.external.localhost diff --git a/charts/matrix-stack/ci/fragments/matrix-authentication-service-minimal.yaml b/charts/matrix-stack/ci/fragments/matrix-authentication-service-minimal.yaml new file mode 100644 index 00000000..064d10ea --- /dev/null +++ b/charts/matrix-stack/ci/fragments/matrix-authentication-service-minimal.yaml @@ -0,0 +1,9 @@ +# Copyright 2025 New Vector Ltd +# +# SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial + +matrixAuthenticationService: + enabled: true + + ingress: + host: mas.ess.localhost diff --git a/charts/matrix-stack/ci/fragments/matrix-authentication-service-pytest-extras.yaml b/charts/matrix-stack/ci/fragments/matrix-authentication-service-pytest-extras.yaml new file mode 100644 index 00000000..3c974411 --- /dev/null +++ b/charts/matrix-stack/ci/fragments/matrix-authentication-service-pytest-extras.yaml @@ -0,0 +1,25 @@ +# Copyright 2025 New Vector Ltd +# +# SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial + +matrixAuthenticationService: + extraEnv: + - name: DEBUG_RENDERING + value: "1" + + ingress: + tlsSecret: "{{ $.Release.Name }}-mas-web-tls" + host: mas.{{ $.Values.serverName }} + + additional: + 000-pytest-admin: + configSecret: "{{ $.Release.Name }}-pytest-admin" + configSecretKey: "admin.yaml" + + postgres: + host: "{{ $.Release.Name }}-mas-postgresql" + user: mas_user + database: mas_db + password: + secret: "{{ $.Release.Name }}-mas-postgres-db" + secretKey: password diff --git a/charts/matrix-stack/ci/fragments/matrix-authentication-service-test-postgres.yaml b/charts/matrix-stack/ci/fragments/matrix-authentication-service-test-postgres.yaml new file mode 100644 index 00000000..726b3d8b --- /dev/null +++ b/charts/matrix-stack/ci/fragments/matrix-authentication-service-test-postgres.yaml @@ -0,0 +1,12 @@ +# Copyright 2025 New Vector Ltd +# +# SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial + +matrixAuthenticationService: + postgres: + host: postgres + user: mas + database: mas + password: + secret: ess-postgres + secretKey: password diff --git a/charts/matrix-stack/ci/fragments/synapse-all-workers-running.yaml b/charts/matrix-stack/ci/fragments/synapse-all-workers-running.yaml new file mode 100644 index 00000000..d65a59a3 --- /dev/null +++ b/charts/matrix-stack/ci/fragments/synapse-all-workers-running.yaml @@ -0,0 +1,44 @@ +# Copyright 2025 New Vector Ltd +# +# SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial + +synapse: + workers: + appservice: + enabled: true + background: + enabled: true + client-reader: + enabled: true + encryption: + enabled: true + event-creator: + enabled: true + event-persister: + enabled: true + instances: 2 + federation-reader: + enabled: true + federation-sender: + enabled: true + initial-synchrotron: + enabled: true + media-repository: + enabled: true + presence-writer: + enabled: true + pusher: + enabled: true + instances: 2 + receipts-account: + enabled: true + sliding-sync: + enabled: true + sso-login: + enabled: true + synchrotron: + enabled: true + typing-persister: + enabled: true + user-dir: + enabled: true diff --git a/charts/matrix-stack/ci/fragments/synapse-checkov.yaml b/charts/matrix-stack/ci/fragments/synapse-checkov.yaml new file mode 100644 index 00000000..f37a1b82 --- /dev/null +++ b/charts/matrix-stack/ci/fragments/synapse-checkov.yaml @@ -0,0 +1,15 @@ +# Copyright 2025 New Vector Ltd +# +# SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial + +synapse: + annotations: + checkov.io/skip1: CKV_K8S_11=We deliberately don't set CPU limits. Pod is BestEffort not Guaranteed + checkov.io/skip2: CKV_K8S_43=No digests + checkov.io/skip3: CKV2_K8S_6=No network policy yet + + redis: + annotations: + checkov.io/skip1: CKV_K8S_11=We deliberately don't set CPU limits. Pod is BestEffort not Guaranteed + checkov.io/skip2: CKV_K8S_43=No digests + checkov.io/skip3: CKV2_K8S_6=No network policy yet diff --git a/charts/matrix-stack/ci/fragments/synapse-ingress-additional-paths.yaml b/charts/matrix-stack/ci/fragments/synapse-ingress-additional-paths.yaml new file mode 100644 index 00000000..37e1862b --- /dev/null +++ b/charts/matrix-stack/ci/fragments/synapse-ingress-additional-paths.yaml @@ -0,0 +1,23 @@ +# Copyright 2025 New Vector Ltd +# +# SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial + +synapse: + ingress: + additionalPaths: + - path: /_matrix/identity + availability: only_externally + service: + name: sydent + port: + number: 8080 + + - path: /_synapse + availability: blocked + + - path: /other + availability: internally_and_externally + service: + name: something + port: + name: http diff --git a/charts/matrix-stack/ci/fragments/synapse-minimal.yaml b/charts/matrix-stack/ci/fragments/synapse-minimal.yaml new file mode 100644 index 00000000..2b1dd885 --- /dev/null +++ b/charts/matrix-stack/ci/fragments/synapse-minimal.yaml @@ -0,0 +1,17 @@ +# Copyright 2025 New Vector Ltd +# +# SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +# +# The secrets listed here are ones that `initSecrets` can't generate yet. +# Postgres details are also required but this fragment will be combined with +# synapse-test-postgres-values.yaml or synapse-pytest-extra-values.yaml + +serverName: ess.localhost + +synapse: + enabled: true + ingress: + host: synapse.ess.localhost + + registrationSharedSecret: + value: CHANGEME-ooWo6jeidahhei3Hae0eer9U diff --git a/charts/matrix-stack/ci/fragments/synapse-pytest-extras.yaml b/charts/matrix-stack/ci/fragments/synapse-pytest-extras.yaml new file mode 100644 index 00000000..cb390d8b --- /dev/null +++ b/charts/matrix-stack/ci/fragments/synapse-pytest-extras.yaml @@ -0,0 +1,43 @@ +# Copyright 2025 New Vector Ltd +# +# SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial + +synapse: + additional: + 00-userconfig.yaml: + config: | + push: + jitter_dalay: 10 + 01-other-user-config.yaml: + configSecret: "{{ $.Release.Name }}-synapse-secrets" + configSecretKey: "01-other-user-config.yaml" + + registrationSharedSecret: + value: null + secret: "{{ $.Release.Name }}-synapse-secrets" + secretKey: registrationSharedSecret + + extraEnv: + - name: DEBUG_RENDERING + value: "1" + + postgres: + host: "{{ $.Release.Name }}-synapse-postgresql" + user: synapse_user + database: synapse_db + password: + secret: "{{ $.Release.Name }}-synapse-postgres-db" + secretKey: password + + ingress: + host: synapse.{{ $.Values.serverName }} + tlsSecret: "{{ $.Release.Name }}-synapse-web-tls" + + redis: + annotations: + has-no-service-monitor: "true" + workers: + sliding-sync: + enabled: true + media-repository: + enabled: true diff --git a/charts/matrix-stack/ci/fragments/synapse-some-workers-running.yaml b/charts/matrix-stack/ci/fragments/synapse-some-workers-running.yaml new file mode 100644 index 00000000..c1b32fc1 --- /dev/null +++ b/charts/matrix-stack/ci/fragments/synapse-some-workers-running.yaml @@ -0,0 +1,14 @@ +# Copyright 2025 New Vector Ltd +# +# SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial + +synapse: + workers: + appservice: + enabled: true + client-reader: + enabled: true + event-persister: + enabled: true + federation-reader: + enabled: true diff --git a/charts/matrix-stack/ci/fragments/synapse-test-postgres.yaml b/charts/matrix-stack/ci/fragments/synapse-test-postgres.yaml new file mode 100644 index 00000000..8b07cf7b --- /dev/null +++ b/charts/matrix-stack/ci/fragments/synapse-test-postgres.yaml @@ -0,0 +1,12 @@ +# Copyright 2025 New Vector Ltd +# +# SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial + +synapse: + postgres: + host: ess-postgres + user: synapse_user + database: synapse + password: + secret: ess-postgres + secretKey: password diff --git a/charts/matrix-stack/ci/fragments/well-known-minimal.yaml b/charts/matrix-stack/ci/fragments/well-known-minimal.yaml new file mode 100644 index 00000000..d6734028 --- /dev/null +++ b/charts/matrix-stack/ci/fragments/well-known-minimal.yaml @@ -0,0 +1,8 @@ +# Copyright 2025 New Vector Ltd +# +# SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial + +serverName: ess.localhost + +wellKnownDelegation: + enabled: true diff --git a/charts/matrix-stack/ci/fragments/well-known-pytest-extras.yaml b/charts/matrix-stack/ci/fragments/well-known-pytest-extras.yaml new file mode 100644 index 00000000..047d20f5 --- /dev/null +++ b/charts/matrix-stack/ci/fragments/well-known-pytest-extras.yaml @@ -0,0 +1,13 @@ +# Copyright 2025 New Vector Ltd +# +# SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial + +global: + baseDomain: ess.localhost + +# To check that templating works against the ingress +serverName: "{{ $.Values.global.baseDomain }}" + +wellKnownDelegation: + ingress: + tlsSecret: "{{ $.Release.Name }}-well-known-web-tls" diff --git a/charts/matrix-stack/ci/init-secrets-checkov-values.yaml b/charts/matrix-stack/ci/init-secrets-checkov-values.yaml index 56f64c97..aab59a0a 100644 --- a/charts/matrix-stack/ci/init-secrets-checkov-values.yaml +++ b/charts/matrix-stack/ci/init-secrets-checkov-values.yaml @@ -1,6 +1,9 @@ -# Copyright 2024 New Vector Ltd +# Copyright 2024-2025 New Vector Ltd # # SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +# +# source_fragments: init-secrets-minimal.yaml init-secrets-checkov.yaml +# DO NOT EDIT DIRECTLY. Edit the fragment files to add / modify / remove values initSecrets: enabled: true @@ -9,15 +12,11 @@ initSecrets: checkov.io/skip2: CKV_K8S_43=No digests checkov.io/skip3: CKV2_K8S_6=No network policy yet checkov.io/skip4: CKV_K8S_38=The job needs a service account - elementWeb: enabled: false - matrixAuthenticationService: enabled: false - synapse: enabled: false - wellKnownDelegation: enabled: false diff --git a/charts/matrix-stack/ci/init-secrets-minimal-values.yaml b/charts/matrix-stack/ci/init-secrets-minimal-values.yaml index b3965258..430f25c6 100644 --- a/charts/matrix-stack/ci/init-secrets-minimal-values.yaml +++ b/charts/matrix-stack/ci/init-secrets-minimal-values.yaml @@ -1,18 +1,17 @@ -# Copyright 2024 New Vector Ltd +# Copyright 2024-2025 New Vector Ltd # # SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +# +# source_fragments: init-secrets-minimal.yaml +# DO NOT EDIT DIRECTLY. Edit the fragment files to add / modify / remove values initSecrets: enabled: true - elementWeb: enabled: false - matrixAuthenticationService: enabled: false - synapse: enabled: false - wellKnownDelegation: enabled: false diff --git a/charts/matrix-stack/ci/matrix-authentication-service-checkov-values.yaml b/charts/matrix-stack/ci/matrix-authentication-service-checkov-values.yaml index 3a73aab0..bd758d10 100644 --- a/charts/matrix-stack/ci/matrix-authentication-service-checkov-values.yaml +++ b/charts/matrix-stack/ci/matrix-authentication-service-checkov-values.yaml @@ -1,35 +1,29 @@ -# Copyright 2024 New Vector Ltd +# Copyright 2024-2025 New Vector Ltd # # SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial - -serverName: ess.localhost +# +# source_fragments: matrix-authentication-service-minimal.yaml matrix-authentication-service-test-postgres.yaml matrix-authentication-service-checkov.yaml init-secrets-minimal.yaml +# DO NOT EDIT DIRECTLY. Edit the fragment files to add / modify / remove values initSecrets: - enabled: false - + enabled: true elementWeb: enabled: false - matrixAuthenticationService: ingress: host: mas.ess.localhost - postgres: host: postgres user: mas database: mas password: - value: CHANGEME-teel5aghaenohhohghiavee5Koh8ahwo - + secret: ess-postgres + secretKey: password annotations: checkov.io/skip1: CKV_K8S_11=We deliberately don't set CPU limits. Pod is BestEffort not Guaranteed checkov.io/skip2: CKV_K8S_43=No digests checkov.io/skip3: CKV2_K8S_6=No network policy yet - synapse: enabled: false - ingress: - host: synapse.ess.localhost - wellKnownDelegation: enabled: false diff --git a/charts/matrix-stack/ci/matrix-authentication-service-external-synapse-values.yaml b/charts/matrix-stack/ci/matrix-authentication-service-external-synapse-values.yaml index c84f4837..1157dfcd 100644 --- a/charts/matrix-stack/ci/matrix-authentication-service-external-synapse-values.yaml +++ b/charts/matrix-stack/ci/matrix-authentication-service-external-synapse-values.yaml @@ -1,28 +1,24 @@ -# Copyright 2025 New Vector Ltd +# Copyright 2024-2025 New Vector Ltd # # SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial - -## Values file containing minimal values for components that are enabled by default only - -elementWeb: - enabled: false +# +# source_fragments: matrix-authentication-service-minimal.yaml matrix-authentication-service-test-postgres.yaml matrix-authentication-service-external-synapse.yaml init-secrets-minimal.yaml +# DO NOT EDIT DIRECTLY. Edit the fragment files to add / modify / remove values initSecrets: - enabled: false - -matrixAuthenticationService: enabled: true - +elementWeb: + enabled: false +matrixAuthenticationService: ingress: host: mas.ess.localhost - postgres: host: postgres user: mas database: mas password: - value: CHANGEME-teel5aghaenohhohghiavee5Koh8ahwo - + secret: ess-postgres + secretKey: password additional: 0000-matrix-server: config: | @@ -34,27 +30,7 @@ matrixAuthenticationService: homeserver: "external.localhost secret: jaix6Am9Shut7zeiduu7ua5maengag3o endpoint: https://syn.external.localhost - - encryptionSecret: - value: CHANGEME-ahohhohgiavee5Koh8ahwo - - privateKeys: - rsa: - value: | - -----BEGIN RSA PRIVATE KEY----- - MIIEowIBAAKCAQEA6521bYjZ789034nLz+oXJyVWqgUdDmRlKxvTfHsBhFtGpOaAoGCCqGSM49AwEHoUQDQgAE6521bYjZ789034nLz+oXJyVWqgUdDmRlKxvTfHsBhFtGpOaAoGCCqGSM49 - ------END RSA PRIVATE KEY----- - ecdsaPrime256v1: - value: | - -----BEGIN EC PRIVATE KEY----- - MHcCAQEEIYjZ789034nLz+oXJyVWqgUdDmRlKxvTfHsBhFtGpOaAoGCCqGSM49 - AwEHoUQDQgAE6521bYjZ789034nLz+oXJyVWqgUdDmRlKxvTfHsBhFtGpOaAoGCCqGSM49 - AwEAAKBcZW5jb2duZXQwgggYMIINL6Ado018734nLz+oXJyVWqgUdDmRlKxvTfHsBhFtGpOaAoGCCqGSM49AwEH - ------END EC PRIVATE KEY----- - - synapse: enabled: false - wellKnownDelegation: enabled: false diff --git a/charts/matrix-stack/ci/matrix-authentication-service-minimal-values.yaml b/charts/matrix-stack/ci/matrix-authentication-service-minimal-values.yaml index 86c89386..77b4a99b 100644 --- a/charts/matrix-stack/ci/matrix-authentication-service-minimal-values.yaml +++ b/charts/matrix-stack/ci/matrix-authentication-service-minimal-values.yaml @@ -1,31 +1,25 @@ -# Copyright 2025 New Vector Ltd +# Copyright 2024-2025 New Vector Ltd # # SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial - -## Values file containing minimal values for components that are enabled by default only - -elementWeb: - enabled: false +# +# source_fragments: matrix-authentication-service-minimal.yaml matrix-authentication-service-test-postgres.yaml init-secrets-minimal.yaml +# DO NOT EDIT DIRECTLY. Edit the fragment files to add / modify / remove values initSecrets: enabled: true - +elementWeb: + enabled: false matrixAuthenticationService: - enabled: true - ingress: host: mas.ess.localhost - postgres: host: postgres user: mas database: mas password: - value: CHANGEME-teel5aghaenohhohghiavee5Koh8ahwo - - + secret: ess-postgres + secretKey: password synapse: enabled: false - wellKnownDelegation: enabled: false diff --git a/charts/matrix-stack/ci/pytest-element-web-values.yaml b/charts/matrix-stack/ci/pytest-element-web-values.yaml index c4b4318e..29c5242a 100644 --- a/charts/matrix-stack/ci/pytest-element-web-values.yaml +++ b/charts/matrix-stack/ci/pytest-element-web-values.yaml @@ -1,45 +1,35 @@ -# Copyright 2024 New Vector Ltd +# Copyright 2024-2025 New Vector Ltd # # SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial - -serverName: ess.localhost +# +# source_fragments: element-web-minimal.yaml element-web-pytest-extras.yaml +# DO NOT EDIT DIRECTLY. Edit the fragment files to add / modify / remove values initSecrets: enabled: false - elementWeb: ingress: host: element.{{ $.Values.serverName }} tlsSecret: "{{ $.Release.Name }}-element-web-tls" - replicas: 1 - annotations: has-no-service-monitor: "true" - additional: - { - "default_server_config": { - "m.homeserver": { - "base_url": "https://synapse.{{ $.Values.serverName }}", - } - }, - "element_call": - {"url": "https://call.{{ $.Values.serverName }}", "use_exclusively": true}, - "features": - { - "feature_video_rooms": true, - "feature_group_calls": true, - "feature_new_room_decoration_ui": true, - "feature_element_call_video_rooms": true, - }, - } - + "default_server_config": + "m.homeserver": + "base_url": "https://synapse.{{ $.Values.serverName }}" + "element_call": + "url": "https://call.{{ $.Values.serverName }}" + "use_exclusively": true + "features": + "feature_video_rooms": true + "feature_group_calls": true + "feature_new_room_decoration_ui": true + "feature_element_call_video_rooms": true matrixAuthenticationService: enabled: false - synapse: enabled: false - wellKnownDelegation: enabled: false +serverName: ess.localhost diff --git a/charts/matrix-stack/ci/pytest-matrix-authentication-service-values.yaml b/charts/matrix-stack/ci/pytest-matrix-authentication-service-values.yaml index 3c88d7b5..f43a138c 100644 --- a/charts/matrix-stack/ci/pytest-matrix-authentication-service-values.yaml +++ b/charts/matrix-stack/ci/pytest-matrix-authentication-service-values.yaml @@ -1,10 +1,41 @@ -# Copyright 2025 New Vector Ltd +# Copyright 2024-2025 New Vector Ltd # # SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +# +# source_fragments: synapse-minimal.yaml synapse-pytest-extras.yaml matrix-authentication-service-minimal.yaml matrix-authentication-service-pytest-extras.yaml init-secrets-minimal.yaml init-secrets-pytest-extras.yaml +# DO NOT EDIT DIRECTLY. Edit the fragment files to add / modify / remove values -serverName: ess.localhost - +initSecrets: + enabled: true + annotations: + has-no-service-monitor: "true" +elementWeb: + enabled: false +matrixAuthenticationService: + ingress: + host: mas.{{ $.Values.serverName }} + tlsSecret: "{{ $.Release.Name }}-mas-web-tls" + extraEnv: + - name: DEBUG_RENDERING + value: "1" + additional: + 000-pytest-admin: + configSecret: "{{ $.Release.Name }}-pytest-admin" + configSecretKey: "admin.yaml" + postgres: + host: "{{ $.Release.Name }}-mas-postgresql" + user: mas_user + database: mas_db + password: + secret: "{{ $.Release.Name }}-mas-postgres-db" + secretKey: password synapse: + ingress: + host: synapse.{{ $.Values.serverName }} + tlsSecret: "{{ $.Release.Name }}-synapse-web-tls" + registrationSharedSecret: + secret: "{{ $.Release.Name }}-synapse-secrets" + secretKey: registrationSharedSecret additional: 00-userconfig.yaml: config: | @@ -13,11 +44,9 @@ synapse: 01-other-user-config.yaml: configSecret: "{{ $.Release.Name }}-synapse-secrets" configSecretKey: "01-other-user-config.yaml" - - registrationSharedSecret: - secret: "{{ $.Release.Name }}-synapse-secrets" - secretKey: registrationSharedSecret - + extraEnv: + - name: DEBUG_RENDERING + value: "1" postgres: host: "{{ $.Release.Name }}-synapse-postgresql" user: synapse_user @@ -25,11 +54,6 @@ synapse: password: secret: "{{ $.Release.Name }}-synapse-postgres-db" secretKey: password - - ingress: - host: synapse.{{ $.Values.serverName }} - tlsSecret: "{{ $.Release.Name }}-synapse-web-tls" - redis: annotations: has-no-service-monitor: "true" @@ -38,37 +62,6 @@ synapse: enabled: true media-repository: enabled: true - -matrixAuthenticationService: - enabled: true - - extraEnv: - - name: DEBUG_RENDERING - value: "1" - - ingress: - tlsSecret: "{{ $.Release.Name }}-mas-web-tls" - host: mas.{{ $.Values.serverName }} - - additional: - 000-pytest-admin: - configSecret: "{{ $.Release.Name }}-pytest-admin" - configSecretKey: "admin.yaml" - - postgres: - host: "{{ $.Release.Name }}-mas-postgresql" - user: mas_user - database: mas_db - password: - secret: "{{ $.Release.Name }}-mas-postgres-db" - secretKey: password - -initSecrets: - annotations: - has-no-service-monitor: "true" - -elementWeb: - enabled: false - wellKnownDelegation: enabled: false +serverName: ess.localhost diff --git a/charts/matrix-stack/ci/pytest-synapse-values.yaml b/charts/matrix-stack/ci/pytest-synapse-values.yaml index c334a832..11d93d10 100644 --- a/charts/matrix-stack/ci/pytest-synapse-values.yaml +++ b/charts/matrix-stack/ci/pytest-synapse-values.yaml @@ -1,10 +1,25 @@ -# Copyright 2024 New Vector Ltd +# Copyright 2024-2025 New Vector Ltd # # SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +# +# source_fragments: synapse-minimal.yaml synapse-pytest-extras.yaml init-secrets-minimal.yaml init-secrets-pytest-extras.yaml +# DO NOT EDIT DIRECTLY. Edit the fragment files to add / modify / remove values -serverName: ess.localhost - +initSecrets: + enabled: true + annotations: + has-no-service-monitor: "true" +elementWeb: + enabled: false +matrixAuthenticationService: + enabled: false synapse: + ingress: + host: synapse.{{ $.Values.serverName }} + tlsSecret: "{{ $.Release.Name }}-synapse-web-tls" + registrationSharedSecret: + secret: "{{ $.Release.Name }}-synapse-secrets" + secretKey: registrationSharedSecret additional: 00-userconfig.yaml: config: | @@ -13,15 +28,9 @@ synapse: 01-other-user-config.yaml: configSecret: "{{ $.Release.Name }}-synapse-secrets" configSecretKey: "01-other-user-config.yaml" - extraEnv: - - name: DEBUG_RENDERING - value: "1" - - registrationSharedSecret: - secret: "{{ $.Release.Name }}-synapse-secrets" - secretKey: registrationSharedSecret - + - name: DEBUG_RENDERING + value: "1" postgres: host: "{{ $.Release.Name }}-synapse-postgresql" user: synapse_user @@ -29,11 +38,6 @@ synapse: password: secret: "{{ $.Release.Name }}-synapse-postgres-db" secretKey: password - - ingress: - host: synapse.{{ $.Values.serverName }} - tlsSecret: "{{ $.Release.Name }}-synapse-web-tls" - redis: annotations: has-no-service-monitor: "true" @@ -42,16 +46,6 @@ synapse: enabled: true media-repository: enabled: true - -initSecrets: - annotations: - has-no-service-monitor: "true" - -elementWeb: - enabled: false - -matrixAuthenticationService: - enabled: false - wellKnownDelegation: enabled: false +serverName: ess.localhost diff --git a/charts/matrix-stack/ci/pytest-well-known-values.yaml b/charts/matrix-stack/ci/pytest-well-known-values.yaml index 8450c137..62484cfc 100644 --- a/charts/matrix-stack/ci/pytest-well-known-values.yaml +++ b/charts/matrix-stack/ci/pytest-well-known-values.yaml @@ -1,25 +1,23 @@ -# Copyright 2024 New Vector Ltd +# Copyright 2024-2025 New Vector Ltd # # SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial - -global: - baseDomain: ess.localhost - -# To check that templating works against the ingress -serverName: "{{ $.Values.global.baseDomain }}" +# +# source_fragments: well-known-minimal.yaml well-known-pytest-extras.yaml +# DO NOT EDIT DIRECTLY. Edit the fragment files to add / modify / remove values initSecrets: enabled: false - -synapse: - enabled: false - elementWeb: enabled: false - matrixAuthenticationService: enabled: false - +synapse: + enabled: false wellKnownDelegation: + enabled: true ingress: tlsSecret: "{{ $.Release.Name }}-well-known-web-tls" +# To check that templating works against the ingress +serverName: "{{ $.Values.global.baseDomain }}" +global: + baseDomain: ess.localhost diff --git a/charts/matrix-stack/ci/synapse-additonal-settings-values.yaml b/charts/matrix-stack/ci/synapse-additonal-settings-values.yaml deleted file mode 100644 index 7e6167dd..00000000 --- a/charts/matrix-stack/ci/synapse-additonal-settings-values.yaml +++ /dev/null @@ -1,41 +0,0 @@ -# Copyright 2024 New Vector Ltd -# -# SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial - -serverName: ess.localhost - -elementWeb: - enabled: false - -matrixAuthenticationService: - enabled: false - -synapse: - ingress: - host: synapse.ess.localhost - - additional: - 0-guestConfig: - config: | - allow_guest_access: true - 1-retentionSettings: - config: | - retention_policy: - enabled: true - 2-userProvided: - configSecret: my-user-config - configSecretKey: shared.yaml - registrationSharedSecret: - value: CHANGEME-ooWo6jeidahhei3Hae0eer9U - macaroon: - value: CHANGEME-eek3Eigoh8ux8laeTingeej1 - signingKey: - value: ed25519 0 bNQOzBUDszff7Ax81z6w0uZ1IPWoxYaazT7emaZEfpw - - postgres: - host: ess-postgres - user: synapse_user - database: synapse - password: - secret: ess-postgres - secretKey: password diff --git a/charts/matrix-stack/ci/synapse-checkov-with-workers-values.yaml b/charts/matrix-stack/ci/synapse-checkov-with-workers-values.yaml index 979ce8fa..b8b79c32 100644 --- a/charts/matrix-stack/ci/synapse-checkov-with-workers-values.yaml +++ b/charts/matrix-stack/ci/synapse-checkov-with-workers-values.yaml @@ -1,35 +1,26 @@ -# Copyright 2024 New Vector Ltd +# Copyright 2024-2025 New Vector Ltd # # SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial - -serverName: ess.localhost +# +# source_fragments: synapse-minimal.yaml synapse-test-postgres.yaml synapse-some-workers-running.yaml synapse-checkov.yaml haproxy-checkov.yaml init-secrets-minimal.yaml init-secrets-checkov.yaml +# DO NOT EDIT DIRECTLY. Edit the fragment files to add / modify / remove values initSecrets: - enabled: false - -elementWeb: - enabled: false - -matrixAuthenticationService: - enabled: false - -haproxy: + enabled: true annotations: checkov.io/skip1: CKV_K8S_11=We deliberately don't set CPU limits. Pod is BestEffort not Guaranteed checkov.io/skip2: CKV_K8S_43=No digests checkov.io/skip3: CKV2_K8S_6=No network policy yet - + checkov.io/skip4: CKV_K8S_38=The job needs a service account +elementWeb: + enabled: false +matrixAuthenticationService: + enabled: false synapse: ingress: host: synapse.ess.localhost - registrationSharedSecret: value: CHANGEME-ooWo6jeidahhei3Hae0eer9U - macaroon: - value: CHANGEME-eek3Eigoh8ux8laeTingeej1 - signingKey: - value: ed25519 0 bNQOzBUDszff7Ax81z6w0uZ1IPWoxYaazT7emaZEfpw - postgres: host: ess-postgres user: synapse_user @@ -37,12 +28,6 @@ synapse: password: secret: ess-postgres secretKey: password - - annotations: - checkov.io/skip1: CKV_K8S_11=We deliberately don't set CPU limits. Pod is BestEffort not Guaranteed - checkov.io/skip2: CKV_K8S_43=No digests - checkov.io/skip3: CKV2_K8S_6=No network policy yet - workers: appservice: enabled: true @@ -50,11 +35,22 @@ synapse: enabled: true event-persister: enabled: true + federation-reader: + enabled: true + annotations: + checkov.io/skip1: CKV_K8S_11=We deliberately don't set CPU limits. Pod is BestEffort not Guaranteed + checkov.io/skip2: CKV_K8S_43=No digests + checkov.io/skip3: CKV2_K8S_6=No network policy yet redis: annotations: checkov.io/skip1: CKV_K8S_11=We deliberately don't set CPU limits. Pod is BestEffort not Guaranteed checkov.io/skip2: CKV_K8S_43=No digests checkov.io/skip3: CKV2_K8S_6=No network policy yet - wellKnownDelegation: enabled: false +serverName: ess.localhost +haproxy: + annotations: + checkov.io/skip1: CKV_K8S_11=We deliberately don't set CPU limits. Pod is BestEffort not Guaranteed + checkov.io/skip2: CKV_K8S_43=No digests + checkov.io/skip3: CKV2_K8S_6=No network policy yet diff --git a/charts/matrix-stack/ci/synapse-ingress-additional-paths-values.yaml b/charts/matrix-stack/ci/synapse-ingress-additional-paths-values.yaml index 53f3a720..5b4f71e4 100644 --- a/charts/matrix-stack/ci/synapse-ingress-additional-paths-values.yaml +++ b/charts/matrix-stack/ci/synapse-ingress-additional-paths-values.yaml @@ -1,47 +1,36 @@ -# Copyright 2024 New Vector Ltd +# Copyright 2024-2025 New Vector Ltd # # SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial - -serverName: ess.localhost +# +# source_fragments: synapse-minimal.yaml synapse-test-postgres.yaml synapse-ingress-additional-paths.yaml init-secrets-minimal.yaml +# DO NOT EDIT DIRECTLY. Edit the fragment files to add / modify / remove values initSecrets: - enabled: false - + enabled: true elementWeb: enabled: false - matrixAuthenticationService: enabled: false - synapse: ingress: host: synapse.ess.localhost - additionalPaths: - - path: /_matrix/identity - availability: only_externally - service: - name: sydent - port: - number: 8080 - - - path: /_synapse - availability: blocked - - - path: /other - availability: internally_and_externally - service: - name: something - port: - name: http - + - path: /_matrix/identity + availability: only_externally + service: + name: sydent + port: + number: 8080 + - path: /_synapse + availability: blocked + - path: /other + availability: internally_and_externally + service: + name: something + port: + name: http registrationSharedSecret: value: CHANGEME-ooWo6jeidahhei3Hae0eer9U - macaroon: - value: CHANGEME-eek3Eigoh8ux8laeTingeej1 - signingKey: - value: ed25519 0 bNQOzBUDszff7Ax81z6w0uZ1IPWoxYaazT7emaZEfpw - postgres: host: ess-postgres user: synapse_user @@ -49,3 +38,6 @@ synapse: password: secret: ess-postgres secretKey: password +wellKnownDelegation: + enabled: false +serverName: ess.localhost diff --git a/charts/matrix-stack/ci/synapse-minimal-values.yaml b/charts/matrix-stack/ci/synapse-minimal-values.yaml index bcfb9c8e..2689b08f 100644 --- a/charts/matrix-stack/ci/synapse-minimal-values.yaml +++ b/charts/matrix-stack/ci/synapse-minimal-values.yaml @@ -1,31 +1,28 @@ -# Copyright 2024 New Vector Ltd +# Copyright 2024-2025 New Vector Ltd # # SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial - -serverName: ess.localhost +# +# source_fragments: synapse-minimal.yaml synapse-test-postgres.yaml init-secrets-minimal.yaml +# DO NOT EDIT DIRECTLY. Edit the fragment files to add / modify / remove values initSecrets: enabled: true - elementWeb: enabled: false - matrixAuthenticationService: enabled: false - synapse: ingress: host: synapse.ess.localhost - registrationSharedSecret: value: CHANGEME-ooWo6jeidahhei3Hae0eer9U - postgres: host: ess-postgres user: synapse_user database: synapse password: - value: CHANGEME-ooWo6jeidahhei3Hae0eer9U - + secret: ess-postgres + secretKey: password wellKnownDelegation: enabled: false +serverName: ess.localhost diff --git a/charts/matrix-stack/ci/synapse-worker-example-values.yaml b/charts/matrix-stack/ci/synapse-worker-example-values.yaml index b54fcba2..8d0e5a38 100644 --- a/charts/matrix-stack/ci/synapse-worker-example-values.yaml +++ b/charts/matrix-stack/ci/synapse-worker-example-values.yaml @@ -1,36 +1,28 @@ -# Copyright 2024 New Vector Ltd +# Copyright 2024-2025 New Vector Ltd # # SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial - -serverName: ess.localhost +# +# source_fragments: synapse-minimal.yaml synapse-test-postgres.yaml synapse-all-workers-running.yaml init-secrets-minimal.yaml +# DO NOT EDIT DIRECTLY. Edit the fragment files to add / modify / remove values initSecrets: - enabled: false - + enabled: true elementWeb: enabled: false - matrixAuthenticationService: enabled: false - synapse: ingress: host: synapse.ess.localhost - registrationSharedSecret: value: CHANGEME-ooWo6jeidahhei3Hae0eer9U - macaroon: - value: CHANGEME-eek3Eigoh8ux8laeTingeej1 - signingKey: - value: ed25519 0 bNQOzBUDszff7Ax81z6w0uZ1IPWoxYaazT7emaZEfpw - postgres: host: ess-postgres user: synapse_user database: synapse password: - value: CHANGEME-ooWo6jeidahhei3Hae0eer9U - + secret: ess-postgres + secretKey: password workers: appservice: enabled: true @@ -70,6 +62,6 @@ synapse: enabled: true user-dir: enabled: true - wellKnownDelegation: enabled: false +serverName: ess.localhost diff --git a/charts/matrix-stack/ci/well-known-checkov-values.yaml b/charts/matrix-stack/ci/well-known-checkov-values.yaml index 3ae3e8d1..191db561 100644 --- a/charts/matrix-stack/ci/well-known-checkov-values.yaml +++ b/charts/matrix-stack/ci/well-known-checkov-values.yaml @@ -1,21 +1,21 @@ -# Copyright 2024 New Vector Ltd +# Copyright 2024-2025 New Vector Ltd # # SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial - -serverName: ess.localhost +# +# source_fragments: well-known-minimal.yaml haproxy-checkov.yaml +# DO NOT EDIT DIRECTLY. Edit the fragment files to add / modify / remove values initSecrets: enabled: false - elementWeb: enabled: false - matrixAuthenticationService: enabled: false - synapse: enabled: false - +wellKnownDelegation: + enabled: true +serverName: ess.localhost haproxy: annotations: checkov.io/skip1: CKV_K8S_11=We deliberately don't set CPU limits. Pod is BestEffort not Guaranteed diff --git a/charts/matrix-stack/ci/well-known-mas-values.yaml b/charts/matrix-stack/ci/well-known-mas-values.yaml index 425730dc..32697241 100644 --- a/charts/matrix-stack/ci/well-known-mas-values.yaml +++ b/charts/matrix-stack/ci/well-known-mas-values.yaml @@ -1,51 +1,26 @@ -# Copyright 2024 New Vector Ltd +# Copyright 2024-2025 New Vector Ltd # # SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial - -serverName: ess.localhost +# +# source_fragments: well-known-minimal.yaml matrix-authentication-service-minimal.yaml matrix-authentication-service-test-postgres.yaml init-secrets-minimal.yaml +# DO NOT EDIT DIRECTLY. Edit the fragment files to add / modify / remove values initSecrets: - enabled: false - + enabled: true elementWeb: enabled: false - matrixAuthenticationService: - enabled: true ingress: host: mas.ess.localhost - postgres: host: postgres user: mas database: mas password: - value: CHANGEME-teel5aghaenohhohghiavee5Koh8ahwo - - encryptionSecret: - value: CHANGEME-ahohhohgiavee5Koh8ahwo - - synapseSharedSecret: - value: CHANGEME-ooWo6jeidahhei3Hae0eer9U - - privateKeys: - rsa: - value: | - -----BEGIN RSA PRIVATE KEY----- - MIIEowIBAAKCAQEA6521bYjZ789034nLz+oXJyVWqgUdDmRlKxvTfHsBhFtGpOaAoGCCqGSM49AwEHoUQDQgAE6521bYjZ789034nLz+oXJyVWqgUdDmRlKxvTfHsBhFtGpOaAoGCCqGSM49 - ------END RSA PRIVATE KEY----- - ecdsaPrime256v1: - value: | - -----BEGIN EC PRIVATE KEY----- - MHcCAQEEIYjZ789034nLz+oXJyVWqgUdDmRlKxvTfHsBhFtGpOaAoGCCqGSM49 - AwEHoUQDQgAE6521bYjZ789034nLz+oXJyVWqgUdDmRlKxvTfHsBhFtGpOaAoGCCqGSM49 - AwEAAKBcZW5jb2duZXQwgggYMIINL6Ado018734nLz+oXJyVWqgUdDmRlKxvTfHsBhFtGpOaAoGCCqGSM49AwEH - ------END EC PRIVATE KEY----- - + secret: ess-postgres + secretKey: password synapse: enabled: false - ingress: - host: synapse.ess.localhost - wellKnownDelegation: enabled: true +serverName: ess.localhost diff --git a/charts/matrix-stack/ci/well-known-minimal-values.yaml b/charts/matrix-stack/ci/well-known-minimal-values.yaml index c70d8d42..14c5893f 100644 --- a/charts/matrix-stack/ci/well-known-minimal-values.yaml +++ b/charts/matrix-stack/ci/well-known-minimal-values.yaml @@ -1,20 +1,18 @@ -# Copyright 2024 New Vector Ltd +# Copyright 2024-2025 New Vector Ltd # # SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial - -serverName: ess.localhost +# +# source_fragments: well-known-minimal.yaml +# DO NOT EDIT DIRECTLY. Edit the fragment files to add / modify / remove values initSecrets: enabled: false - elementWeb: enabled: false - matrixAuthenticationService: enabled: false - synapse: enabled: false - wellKnownDelegation: enabled: true +serverName: ess.localhost diff --git a/charts/matrix-stack/ci/well-known-synapse-mas-values.yaml b/charts/matrix-stack/ci/well-known-synapse-mas-values.yaml index 97f7d634..1fce5763 100644 --- a/charts/matrix-stack/ci/well-known-synapse-mas-values.yaml +++ b/charts/matrix-stack/ci/well-known-synapse-mas-values.yaml @@ -1,59 +1,29 @@ -# Copyright 2024 New Vector Ltd +# Copyright 2024-2025 New Vector Ltd # # SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial - -serverName: ess.localhost +# +# source_fragments: well-known-minimal.yaml synapse-minimal.yaml synapse-test-postgres.yaml matrix-authentication-service-minimal.yaml matrix-authentication-service-test-postgres.yaml init-secrets-minimal.yaml +# DO NOT EDIT DIRECTLY. Edit the fragment files to add / modify / remove values initSecrets: - enabled: false - + enabled: true elementWeb: enabled: false - matrixAuthenticationService: - enabled: true ingress: host: mas.ess.localhost - postgres: host: postgres user: mas database: mas password: - value: CHANGEME-teel5aghaenohhohghiavee5Koh8ahwo - - encryptionSecret: - value: CHANGEME-ahohhohgiavee5Koh8ahwo - - synapseSharedSecret: - value: CHANGEME-ooWo6jeidahhei3Hae0eer9U - - privateKeys: - rsa: - value: | - -----BEGIN RSA PRIVATE KEY----- - MIIEowIBAAKCAQEA6521bYjZ789034nLz+oXJyVWqgUdDmRlKxvTfHsBhFtGpOaAoGCCqGSM49AwEHoUQDQgAE6521bYjZ789034nLz+oXJyVWqgUdDmRlKxvTfHsBhFtGpOaAoGCCqGSM49 - ------END RSA PRIVATE KEY----- - ecdsaPrime256v1: - value: | - -----BEGIN EC PRIVATE KEY----- - MHcCAQEEIYjZ789034nLz+oXJyVWqgUdDmRlKxvTfHsBhFtGpOaAoGCCqGSM49 - AwEHoUQDQgAE6521bYjZ789034nLz+oXJyVWqgUdDmRlKxvTfHsBhFtGpOaAoGCCqGSM49 - AwEAAKBcZW5jb2duZXQwgggYMIINL6Ado018734nLz+oXJyVWqgUdDmRlKxvTfHsBhFtGpOaAoGCCqGSM49AwEH - ------END EC PRIVATE KEY----- - + secret: ess-postgres + secretKey: password synapse: - enabled: true ingress: host: synapse.ess.localhost - registrationSharedSecret: value: CHANGEME-ooWo6jeidahhei3Hae0eer9U - macaroon: - value: CHANGEME-eek3Eigoh8ux8laeTingeej1 - signingKey: - value: ed25519 0 bNQOzBUDszff7Ax81z6w0uZ1IPWoxYaazT7emaZEfpw - postgres: host: ess-postgres user: synapse_user @@ -61,6 +31,6 @@ synapse: password: secret: ess-postgres secretKey: password - wellKnownDelegation: enabled: true +serverName: ess.localhost diff --git a/charts/matrix-stack/ci/well-known-synapse-values.yaml b/charts/matrix-stack/ci/well-known-synapse-values.yaml index 0046bce2..b279da67 100644 --- a/charts/matrix-stack/ci/well-known-synapse-values.yaml +++ b/charts/matrix-stack/ci/well-known-synapse-values.yaml @@ -1,30 +1,21 @@ -# Copyright 2024 New Vector Ltd +# Copyright 2024-2025 New Vector Ltd # # SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial - -serverName: ess.localhost +# +# source_fragments: well-known-minimal.yaml synapse-minimal.yaml synapse-test-postgres.yaml init-secrets-minimal.yaml +# DO NOT EDIT DIRECTLY. Edit the fragment files to add / modify / remove values initSecrets: - enabled: false - + enabled: true elementWeb: enabled: false - matrixAuthenticationService: enabled: false - synapse: - enabled: true ingress: host: synapse.ess.localhost - registrationSharedSecret: value: CHANGEME-ooWo6jeidahhei3Hae0eer9U - macaroon: - value: CHANGEME-eek3Eigoh8ux8laeTingeej1 - signingKey: - value: ed25519 0 bNQOzBUDszff7Ax81z6w0uZ1IPWoxYaazT7emaZEfpw - postgres: host: ess-postgres user: synapse_user @@ -32,6 +23,6 @@ synapse: password: secret: ess-postgres secretKey: password - wellKnownDelegation: enabled: true +serverName: ess.localhost diff --git a/newsfragments/159.internal.md b/newsfragments/159.internal.md new file mode 100644 index 00000000..bf48244c --- /dev/null +++ b/newsfragments/159.internal.md @@ -0,0 +1 @@ +Assemble the CI values files from fragments to reduce c/p'ing and make it easy to see the purpose of some values.