Skip to content

Commit 7dc2394

Browse files
committed
Add docs for unique_identifier
1 parent ad89d3f commit 7dc2394

File tree

1 file changed

+6
-1
lines changed
  • crates/stackable-operator/src/commons/s3

1 file changed

+6
-1
lines changed

crates/stackable-operator/src/commons/s3/helpers.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,9 @@ impl ResolvedS3Connection {
7979
///
8080
/// * Credentials needed to connect to S3
8181
/// * Needed TLS volumes
82+
///
83+
/// `unique_identifier` needs to be a unique identifier (e.g. in case of trino-operator the name of the catalog),
84+
/// so that multiple mounts of the same SecretClass do not produce clashing volumes and volumeMounts.
8285
pub fn add_volumes_and_mounts(
8386
&self,
8487
unique_identifier: &str,
@@ -134,6 +137,9 @@ impl ResolvedS3Connection {
134137

135138
/// Returns the path of the files containing bind user and password.
136139
/// This will be None if there are no credentials for this LDAP connection.
140+
///
141+
/// `unique_identifier` needs to be a unique identifier (e.g. in case of trino-operator the name of the catalog),
142+
/// so that multiple mounts of the same SecretClass do not produce clashing volumes and volumeMounts.
137143
pub fn credentials_mount_paths(&self, unique_identifier: &str) -> Option<(String, String)> {
138144
self.credentials.as_ref().map(|bind_credentials| {
139145
let secret_class = &bind_credentials.secret_class;
@@ -199,7 +205,6 @@ mod test {
199205
use super::*;
200206

201207
// We cant test the correct resolve, as we can't mock the k8s API.
202-
203208
#[test]
204209
fn test_http() {
205210
let s3 = ResolvedS3Connection {

0 commit comments

Comments
 (0)