Commit Graph
51 Commits
Author SHA1 Message Date
Ben Banfield-Zanin 1c59915892 Refactor element-io.ess-library.pods.commonSpec to take 'kind' rather than a 'deployment' boolean 2026-02-20 09:45:32 +00:00
Gaël Goinvic 7195e4f840 Test clusterIP presence 2026-01-22 11:53:32 +01:00
Ben Banfield-Zanin 4e932b2efe Add extraInitContainers support to all workloads. 2026-01-15 16:14:53 +00:00
Gaël Goinvic d56c124bb5 update copyright date 2026-01-05 18:05:21 +01:00
Gaël Goinvic 168fb5ba64 Support extraVolumes/Mounts in all templates
- This validates that all templates support extraVolumes and
extraVolumeMounts
- It does have hook support everywhere
2026-01-05 15:18:37 +01:00
Bardi Harborow eb7d3b3bfd Expose services as dual-stack where possible
This commit directs Kubernetes to assign both IPv4 and IPv6 ClusterIPs to all services where possible.
2025-12-02 23:06:47 +11:00
Ben Banfield-Zanin 630ad34160 Ensure Postgres is fully setup before marking as available or live.
When the Postgres container initialises itself it does so without binding any TCP ports, only allowing
connections on the Unix socket. Only after it restarts after running the entrypoint scripts/SQL does it
bind TCP ports. Make the liveness/readiness/startup probes only use the TCP port so that we don't mark
Postgres as being ready and available too early.

```
...
2025-11-25 16:56:15.588 UTC [32] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
2025-11-25 16:56:15.597 UTC [35] LOG:  database system was shut down at 2025-11-25 16:56:15 UTC
2025-11-25 16:56:15.606 UTC [32] LOG:  database system is ready to accept connections
 done
server started

/usr/local/bin/docker-entrypoint.sh: sourcing /docker-entrypoint-initdb.d/init-ess-dbs.sh
Password:
Password:
CREATE ROLE
Password:
Password:
Password:
CREATE ROLE
Password:

2025-11-25 16:56:15.934 UTC [32] LOG:  received fast shutdown request
waiting for server to shut down....2025-11-25 16:56:15.938 UTC [32] LOG:  aborting any active transactions
2025-11-25 16:56:15.946 UTC [32] LOG:  background worker "logical replication launcher" (PID 38) exited with exit code 1
2025-11-25 16:56:15.954 UTC [33] LOG:  shutting down
2025-11-25 16:56:15.958 UTC [33] LOG:  checkpoint starting: shutdown immediate
2025-11-25 16:56:16.042 UTC [33] LOG:  checkpoint complete: wrote 1853 buffers (1.4%); 0 WAL file(s) added, 0 removed, 0 recycled; write=0.071 s, sync=0.008 s, total=0.088 s; sync files=604, longest=0.003 s, average=0.001 s; distance=8515 kB, estimate=8515 kB; lsn=0/1D3DDC0, redo lsn=0/1D3DDC0
2025-11-25 16:56:16.070 UTC [32] LOG:  database system is shut down
 done
server stopped

PostgreSQL init process complete; ready for start up.

2025-11-25 16:56:16.189 UTC [1] LOG:  starting PostgreSQL 17.7 on x86_64-pc-linux-musl, compiled by gcc (Alpine 14.2.0) 14.2.0, 64-bit
2025-11-25 16:56:16.189 UTC [1] LOG:  listening on IPv4 address "0.0.0.0", port 5432
2025-11-25 16:56:16.189 UTC [1] LOG:  listening on IPv6 address "::", port 5432
2025-11-25 16:56:16.194 UTC [1] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
2025-11-25 16:56:16.202 UTC [87] LOG:  database system was shut down at 2025-11-25 16:56:16 UTC
2025-11-25 16:56:16.257 UTC [1] LOG:  database system is ready to accept connections
/usr/local/bin/docker-entrypoint.sh: sourcing /docker-entrypoint-initdb.d/init-ess-dbs.sh
Password:
Password:
CREATE ROLE
Password:
Password:
Password:
CREATE ROLE
Password:

2025-11-25 16:56:15.934 UTC [32] LOG:  received fast shutdown request
...
2025-11-25 16:56:30.082 UTC [129] ERROR:  deadlock detected
2025-11-25 16:56:30.082 UTC [129] DETAIL:  Process 129 waits for ShareLock on virtual transaction 22/5; blocked by process 130.
	Process 130 waits for ExclusiveLock on advisory lock [16385,438033630,3765090638,1]; blocked by process 129.
	Process 129: -- no-transaction
	-- Copyright 2025 New Vector Ltd.
	--
	-- SPDX-License-Identifier: AGPL-3.0-only
	-- Please see LICENSE in the repository root for full details.

	CREATE INDEX CONCURRENTLY
	  compat_access_tokens_session_fk
	  ON compat_access_tokens (compat_session_id);

	Process 130: SELECT pg_advisory_lock($1)
...
```
2025-11-26 10:41:21 +00:00
Ben Banfield-Zanin c5707120b6 Make Postgres' emptyDirs memory backed 2025-11-25 09:03:17 +00:00
Ben Banfield-Zanin fd210e257b Have a common helper for constructing StatefulSet.spec too 2025-11-17 15:48:29 +00:00
Ben Banfield-Zanin 75c884dc74 git ls-files | xargs sed -i '/^Copyright .* New Vector Ltd/a Copyright 2025 Element Creations Ltd' 2025-10-27 08:43:19 +00:00
Gaël Goinvic 218b7ee497 inspect lifecycle prestop commands and fix postgres-ess-updater 2025-10-23 14:19:59 +02:00
Gaël Goinvic afffdcd7cd fix postgres needs tmp dir 2025-10-23 14:19:57 +02:00
Gaël Goinvic f10dde135f fix paths detection with subPath 2025-10-23 14:19:56 +02:00
Gaël Goinvic 66845a9878 add content volume mapping var 2025-10-23 14:19:55 +02:00
Ben Banfield-Zanin 617e646e31 Add image.pullPolicy 2025-10-10 14:37:17 +01:00
Gaël Goinvic 62f386fa83 add a validation check to make sure components are not sharing a pg db 2025-10-07 10:53:47 +02:00
Ben Banfield-Zanin e74949db5c Consistently handle user provided extraEnv versus chart configured env 2025-06-16 11:23:22 +01:00
Gaël Goinvic f6a4683d11 index secret based on hash of their names 2025-06-05 15:10:22 +02:00
Ben Banfield-Zanin 8d6688490d Ensure the names of Secrets in volume/volumeMounts don't have names that are too long. 2025-05-28 09:22:02 +01:00
Ben Banfield-Zanin 32a7f34be4 Make startupProbes configurable 2025-05-13 13:46:22 +01:00
Ben Banfield-Zanin 33a4bb170e Make readinessProbes configurable 2025-05-13 13:46:22 +01:00
Ben Banfield-Zanin 82ed273924 Make livenessProbes configurable 2025-05-13 13:46:17 +01:00
Ben Banfield-Zanin acf03be484 Ensure all Postgres containers have a startupProbe 2025-05-12 15:01:26 +01:00
Ben Banfield-Zanin e5376d91d2 Support extraEnv on every workload 2025-05-02 16:32:12 +01:00
Ben Banfield-Zanin 08758519e6 Manage the helm.sh/resource-policy for PVCs 2025-04-28 11:47:38 +01:00
Gaël Goinvic 5b5350717f postgres: make sure we can use extraEnv properly 2025-04-28 09:33:12 +02:00
Gaël Goinvic 6e10a7863a use mustMergeOverwrite to error out on bad merges 2025-04-25 17:05:53 +02:00
Gaël Goinvic 1a9dbde4dc Replace merge with mergeOverwrite to properly merge booleans. 2025-04-25 16:26:09 +02:00
Ben Banfield-Zanin c261952244 Clamp/restrict the app.kubernetes.io/version label too 2025-04-23 12:07:27 +01:00
Ben Banfield-Zanin 93a9792bfa Move Postgres config/secret hashes to labels for consistency with every other component 2025-04-17 14:46:50 +01:00
Gaël Goinvic e5503f03ad postgres: move configure-dbs.sh to tpl file 2025-04-17 11:03:38 +02:00
Gaël Goinvic e5ad88c6e3 postgres: use helpers for configs data, drop chart version from pod labels 2025-04-17 10:23:27 +02:00
Gaël Goinvic d8b7eb2c14 element-web: move config files in configs/, drop chart version from pod 2025-04-17 09:21:38 +02:00
Gaël Goinvic 317c5c714b topologySpreadConstraints: fix default labels must match pod labels 2025-04-11 09:50:38 +02:00
Gaël Goinvic afc641b276 postgres password: generate only required passwords 2025-04-02 18:17:26 +02:00
Gaël Goinvic 273099b421 Licensing to AGPL-3.0-only 2025-03-20 14:15:02 +01:00
Gaël Goinvic 7cbba3497c tests: verify that mounted secrets are actually used explicitely 2025-03-10 16:11:38 +01:00
Ben Banfield-Zanin f9bfb9584e Add missing type on the Postgres Secret 2025-03-10 11:10:58 +00:00
Gaël Goinvic d7c01243e0 secrets: fix names when hook/non-hook 2025-03-07 11:17:58 +01:00
Ben Banfield-Zanin d47abc3c07 Update element-io.ess-library.check-credential to do validation on generatable credentials too 2025-03-05 14:47:02 +00:00
Ben Banfield-Zanin 3ee704e3c3 Update element-io.ess-library.init-secret-path to unify property fetching and associated error message 2025-03-05 13:32:40 +00:00
Gaël Goinvic 212c04a9fa synapse hook: mount postgres password if required 2025-03-05 10:04:08 +01:00
Ben Banfield-Zanin 6dc8bf3c36 Correct some helper error messages 2025-03-04 16:35:55 +00:00
Gaël Goinvic d0cf709d86 postgres: fix initialization 2025-02-20 14:30:32 +01:00
Gaël Goinvic 6f4a233ea4 postgres: fix duplicated port 2025-02-19 09:10:01 +01:00
Gaël Goinvic 2cbe418e9a init-secret-path: fail if initSecret is disabled and secret is not
provided
2025-02-14 09:04:09 +01:00
Gaël Goinvic 23d2054966 postgres: use a distinct user/password for each component 2025-02-13 16:51:09 +01:00
Gaël Goinvic 4ed10c2f40 postgres secret: add a helper to determine what's the name of the secret 2025-02-13 14:18:08 +01:00
Gaël Goinvic e53b8412b2 rename postgres annotations 2025-02-13 14:18:07 +01:00
Gaël Goinvic ebfd5bc937 postgresq: 1 replicas 2025-02-13 14:18:07 +01:00