Skip to content

Commit 7c8f6e6

Browse files
committed
add release notes and add keyfile for all containers
1 parent b926669 commit 7c8f6e6

File tree

3 files changed

+15
-0
lines changed

3 files changed

+15
-0
lines changed
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
title: Changing container setup of static architecture
3+
kind: breaking
4+
date: 2025-08-06
5+
---
6+
7+
This change fixes the current complex and difficult-to-maintain architecture for stateful set containers, which relies on an "agent matrix" to map operator and agent versions which led to a sheer amount of images.
8+
We solve this by shifting to a 3-container setup. This new design eliminates the need for the operator-version/agent-version matrix by adding one additional container containing all required binaries. This architecture maps to what we already do with the mongodb-database container.

controllers/operator/construct/appdb_construction.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,12 @@ func CAConfigMapName(appDb om.AppDBSpec, log *zap.SugaredLogger) string {
233233
// and volumemounts for TLS.
234234
func tlsVolumes(appDb om.AppDBSpec, podVars *env.PodEnvVars, log *zap.SugaredLogger) podtemplatespec.Modification {
235235
volumesToAdd, volumeMounts := getTLSVolumesAndVolumeMounts(appDb, podVars, log)
236+
237+
// Add agent API key volume mount if not using vault and monitoring is enabled
238+
if !vault.IsVaultSecretBackend() && ShouldEnableMonitoring(podVars) {
239+
volumeMounts = append(volumeMounts, statefulset.CreateVolumeMount(AgentAPIKeyVolumeName, AgentAPIKeySecretPath))
240+
}
241+
236242
volumesFunc := func(spec *corev1.PodTemplateSpec) {
237243
for _, v := range volumesToAdd {
238244
podtemplatespec.WithVolume(v)(spec)

controllers/operator/construct/database_construction.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -494,6 +494,7 @@ func buildDatabaseStatefulSetConfigurationFunction(mdb databaseStatefulSetSource
494494
shareProcessNs = func(sts *appsv1.StatefulSet) {
495495
sts.Spec.Template.Spec.ShareProcessNamespace = ptr.To(true)
496496
}
497+
staticMods = append(staticMods, podtemplatespec.WithContainerByIndex(0, container.WithVolumeMounts(volumeMounts)))
497498
staticMods = append(staticMods, podtemplatespec.WithContainerByIndex(1, container.WithVolumeMounts(volumeMounts)))
498499
staticMods = append(staticMods, podtemplatespec.WithContainerByIndex(2, container.WithVolumeMounts(volumeMounts)))
499500
databaseImage = opts.AgentImage

0 commit comments

Comments
 (0)