Skip to content

Commit c7c80f6

Browse files
committed
fix: Don't always return an error stating volumeMounts are colliding
1 parent 90d4cc0 commit c7c80f6

File tree

2 files changed

+14
-6
lines changed

2 files changed

+14
-6
lines changed

crates/stackable-operator/CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,13 @@ All notable changes to this project will be documented in this file.
88

99
### Fixed
1010

11+
- Fix always returning an error stating that volumeMounts are colliding. Instead move the error
12+
creation to the correct location within an `if` statement
13+
14+
## [0.77.1] - 2024-09-26
15+
16+
### Fixed
17+
1118
- Fix the logback configuration for logback versions from 1.3.6/1.4.6 to 1.3.11/1.4.11 ([#874]).
1219
- BREAKING: Avoid colliding volumes and mounts by only adding volumes or mounts if they do not already exist. This makes functions such as `PodBuilder::add_volume` or `ContainerBuilder::add_volume_mount` as well as related ones fallible ([#871]).
1320

crates/stackable-operator/src/builder/pod/container.rs

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -232,13 +232,14 @@ impl ContainerBuilder {
232232
?existing_volume_mount,
233233
"Colliding mountPath {colliding_mount_path:?} in volumeMounts with different content"
234234
);
235+
236+
MountPathCollisionSnafu {
237+
mount_path: &volume_mount.mount_path,
238+
existing_volume_name: &existing_volume_mount.name,
239+
new_volume_name: &volume_mount.name,
240+
}
241+
.fail()?;
235242
}
236-
MountPathCollisionSnafu {
237-
mount_path: &volume_mount.mount_path,
238-
existing_volume_name: &existing_volume_mount.name,
239-
new_volume_name: &volume_mount.name,
240-
}
241-
.fail()?;
242243
} else {
243244
self.volume_mounts
244245
.insert(volume_mount.mount_path.clone(), volume_mount);

0 commit comments

Comments
 (0)