Skip to content

fix: pass pod options to custom containers#1804

Open
infocusmodereal wants to merge 1 commit into
mariadb-operator:mainfrom
infocusmodereal:codex/fix-custom-container-pod-options
Open

fix: pass pod options to custom containers#1804
infocusmodereal wants to merge 1 commit into
mariadb-operator:mainfrom
infocusmodereal:codex/fix-custom-container-pod-options

Conversation

@infocusmodereal

Copy link
Copy Markdown

What

Pass mariadbPodOpt options through custom MariaDB init and sidecar container construction.

This makes custom containers use the same volumeMount option set as the Pod template being built. In particular, special builder paths that disable data-plane or service-account volumes no longer risk leaving custom containers with a serviceaccount volumeMount that has no matching Pod volume.

Why

We hit a Galera recovery failure on mariadb-operator 25.10.2 where the generated recovery Job was rejected by Kubernetes:

spec.template.spec.initContainers[0].volumeMounts[3].name: Not found: "serviceaccount"

The immediate Galera recovery Job path is already safer in 25.10.3+ because Galera init/recovery Jobs exclude custom init and sidecar containers. This PR hardens the shared builder path so custom containers consistently respect pod options when they are included by any specialized Pod/Job builder.

Fixes #1803.

Validation

go test ./pkg/builder

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] Galera recovery Job can reference missing serviceaccount volume for custom containers

1 participant