Skip to content

Commit a814f41

Browse files
committed
Make add_volume_mount_impl private
1 parent 6518daa commit a814f41

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ impl ContainerBuilder {
215215
/// Historically this function unconditionally added volumeMounts, which resulted in invalid
216216
/// [`k8s_openapi::api::core::v1::PodSpec`]s, as volumeMounts where added multiple times - think of Trino using the same [`crate::commons::s3::S3Connection`]
217217
/// two times, resulting in e.g. the s3 credentials being mounted twice as the same volumeMount.
218-
pub fn add_volume_mount_struct(&mut self, volume_mount: VolumeMount) -> Result<&mut Self> {
218+
fn add_volume_mount_impl(&mut self, volume_mount: VolumeMount) -> Result<&mut Self> {
219219
if let Some(existing_volume_mount) = self.volume_mounts.get(&volume_mount.mount_path) {
220220
ensure!(
221221
existing_volume_mount == &volume_mount,
@@ -232,26 +232,26 @@ impl ContainerBuilder {
232232
Ok(self)
233233
}
234234

235-
/// See [`Self::add_volume_mount_struct`] for details
235+
/// See [`Self::add_volume_mount_impl`] for details
236236
pub fn add_volume_mount(
237237
&mut self,
238238
name: impl Into<String>,
239239
path: impl Into<String>,
240240
) -> Result<&mut Self> {
241-
self.add_volume_mount_struct(VolumeMount {
241+
self.add_volume_mount_impl(VolumeMount {
242242
name: name.into(),
243243
mount_path: path.into(),
244244
..VolumeMount::default()
245245
})
246246
}
247247

248-
/// See [`Self::add_volume_mount_struct`] for details
248+
/// See [`Self::add_volume_mount_impl`] for details
249249
pub fn add_volume_mounts(
250250
&mut self,
251251
volume_mounts: impl IntoIterator<Item = VolumeMount>,
252252
) -> Result<&mut Self> {
253253
for volume_mount in volume_mounts {
254-
self.add_volume_mount_struct(volume_mount)?;
254+
self.add_volume_mount_impl(volume_mount)?;
255255
}
256256

257257
Ok(self)

0 commit comments

Comments
 (0)