Skip to content

fix!: Make fields on S3 structs mandatory, add S3 helpers #863

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 30 commits into from
Sep 19, 2024
Merged
Changes from 1 commit
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
557845f
refactor!: Add Host type. Fix S3 structs to have mandatory fields
sbernauer Sep 10, 2024
e25c9e0
TLS verification struct now reside top-level in the `commons` module
sbernauer Sep 10, 2024
be75dc2
WIP
sbernauer Sep 10, 2024
68dc317
fix: Use String for Host JsonSchema
sbernauer Sep 11, 2024
4b761eb
changelog
sbernauer Sep 11, 2024
d07bd55
changelog
sbernauer Sep 11, 2024
d97a601
Add unique identifier to avoid clashing volumes and mounts
sbernauer Sep 12, 2024
1f271dd
move identifier to front
sbernauer Sep 12, 2024
decfb05
clippy
sbernauer Sep 12, 2024
20fa37e
Merge branch 'main' into refactor/add-host-struct
sbernauer Sep 12, 2024
5969711
Apply suggestions from code review
sbernauer Sep 12, 2024
687141c
Remove RetrieveS3Bucket error
sbernauer Sep 12, 2024
72417ff
Add some error details
sbernauer Sep 12, 2024
ad89d3f
typo
sbernauer Sep 12, 2024
7dc2394
Add docs for unique_identifier
sbernauer Sep 12, 2024
34d6db8
Apply suggestions from code review
sbernauer Sep 16, 2024
6a27c54
Merge branch 'main' into refactor/add-host-struct
sbernauer Sep 16, 2024
92f09b8
Rename NotAHost -> NotAHost
sbernauer Sep 16, 2024
4fb9d50
Add invalid host to error message
sbernauer Sep 16, 2024
acb84d8
Move to HostParseError
sbernauer Sep 16, 2024
90f9271
Rename Host -> HostName
sbernauer Sep 16, 2024
006e37a
Update crates/stackable-operator/src/commons/networking.rs
sbernauer Sep 18, 2024
5ba4522
Update crates/stackable-operator/CHANGELOG.md
sbernauer Sep 18, 2024
152ee94
Update crates/stackable-operator/CHANGELOG.md
sbernauer Sep 18, 2024
064cc13
Merge branch 'main' into refactor/add-host-struct
sbernauer Sep 19, 2024
9dcd445
changelog
sbernauer Sep 19, 2024
d4e673b
Bump to 0.76.0
sbernauer Sep 19, 2024
16016dc
Merge branch 'main' into refactor/add-host-struct
sbernauer Sep 19, 2024
9e73900
Update crates/stackable-operator/src/commons/networking.rs
sbernauer Sep 19, 2024
87ca305
fix domain names
sbernauer Sep 19, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions crates/stackable-operator/src/commons/s3/helpers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ impl ResolvedS3Connection {

if let Some(credentials) = &self.credentials {
let secret_class = &credentials.secret_class;
let volume_name = format!("{secret_class}-s3-credentials-{unique_identifier}");
let volume_name = format!("{unique_identifier}-{secret_class}-s3-credentials");

volumes.push(
credentials
Expand All @@ -113,7 +113,7 @@ impl ResolvedS3Connection {
mounts.push(
VolumeMountBuilder::new(
volume_name,
format!("{SECRET_BASE_PATH}/{secret_class}-{unique_identifier}"),
format!("{SECRET_BASE_PATH}/{unique_identifier}-{secret_class}"),
)
.build(),
);
Expand All @@ -136,8 +136,8 @@ impl ResolvedS3Connection {
self.credentials.as_ref().map(|bind_credentials| {
let secret_class = &bind_credentials.secret_class;
(
format!("{SECRET_BASE_PATH}/{secret_class}-{unique_identifier}/accessKey"),
format!("{SECRET_BASE_PATH}/{secret_class}-{unique_identifier}/secretKey"),
format!("{SECRET_BASE_PATH}/{unique_identifier}-{secret_class}/accessKey"),
format!("{SECRET_BASE_PATH}/{unique_identifier}-{secret_class}/secretKey"),
)
})
}
Expand Down Expand Up @@ -243,7 +243,7 @@ mod test {

assert_eq!(
&volume.name,
"ionos-s3-credentials-s3-credentials-lakehouse"
"lakehouse-ionos-s3-credentials-s3-credentials"
);
assert_eq!(
&volume
Expand All @@ -264,13 +264,13 @@ mod test {
assert_eq!(mount.name, volume.name);
assert_eq!(
mount.mount_path,
"/stackable/secrets/ionos-s3-credentials-lakehouse"
"/stackable/secrets/lakehouse-ionos-s3-credentials"
);
assert_eq!(
s3.credentials_mount_paths("lakehouse"),
Some((
"/stackable/secrets/ionos-s3-credentials-lakehouse/accessKey".to_string(),
"/stackable/secrets/ionos-s3-credentials-lakehouse/secretKey".to_string()
"/stackable/secrets/lakehouse-ionos-s3-credentials/accessKey".to_string(),
"/stackable/secrets/lakehouse-ionos-s3-credentials/secretKey".to_string()
))
);
}
Expand Down
Loading