From fa4e31b6251b89a5f0de3421ce3e7bc7969c1693 Mon Sep 17 00:00:00 2001 From: Mohsin Zaidi <2236875+smrz2001@users.noreply.github.com> Date: Tue, 21 May 2024 14:12:24 -0400 Subject: [PATCH] fix: inject s3 bucket into cas config (#181) --- operator/src/network/cas.rs | 5 +++++ operator/src/network/controller.rs | 12 ++++++------ .../network/testdata/default_stubs/cas_stateful_set | 8 ++++++++ 3 files changed, 19 insertions(+), 6 deletions(-) diff --git a/operator/src/network/cas.rs b/operator/src/network/cas.rs index cea277d..2647f7e 100644 --- a/operator/src/network/cas.rs +++ b/operator/src/network/cas.rs @@ -270,6 +270,11 @@ pub fn cas_stateful_set_spec( value: Some("s3".to_owned()), ..Default::default() }, + EnvVar { + name: "S3_BUCKET_NAME".to_owned(), + value: Some("ceramic-dev-cas".to_owned()), + ..Default::default() + }, EnvVar { name: "S3_ENDPOINT".to_owned(), value: Some("http://localstack:4566".to_owned()), diff --git a/operator/src/network/controller.rs b/operator/src/network/controller.rs index 830f3fc..22b0960 100644 --- a/operator/src/network/controller.rs +++ b/operator/src/network/controller.rs @@ -2817,7 +2817,7 @@ mod tests { stub.cas_stateful_set.patch(expect![[r#" --- original +++ modified - @@ -130,8 +130,8 @@ + @@ -134,8 +134,8 @@ "value": "http://localstack:4566/000000000000/cas-anchor-dev-" } ], @@ -2828,7 +2828,7 @@ mod tests { "name": "cas-api", "ports": [ { - @@ -264,8 +264,8 @@ + @@ -272,8 +272,8 @@ "value": "false" } ], @@ -2839,7 +2839,7 @@ mod tests { "name": "cas-worker", "resources": { "limits": { - @@ -434,8 +434,8 @@ + @@ -442,8 +442,8 @@ "value": "dev" } ], @@ -2915,7 +2915,7 @@ mod tests { stub.cas_stateful_set.patch(expect![[r#" --- original +++ modified - @@ -140,12 +140,12 @@ + @@ -144,12 +144,12 @@ ], "resources": { "limits": { @@ -2930,7 +2930,7 @@ mod tests { "ephemeral-storage": "1Gi", "memory": "1Gi" } - @@ -269,12 +269,12 @@ + @@ -277,12 +277,12 @@ "name": "cas-worker", "resources": { "limits": { @@ -2945,7 +2945,7 @@ mod tests { "ephemeral-storage": "1Gi", "memory": "1Gi" } - @@ -357,12 +357,12 @@ + @@ -365,12 +365,12 @@ "name": "cas-scheduler", "resources": { "limits": { diff --git a/operator/src/network/testdata/default_stubs/cas_stateful_set b/operator/src/network/testdata/default_stubs/cas_stateful_set index aa97441..d3d3141 100644 --- a/operator/src/network/testdata/default_stubs/cas_stateful_set +++ b/operator/src/network/testdata/default_stubs/cas_stateful_set @@ -121,6 +121,10 @@ Request { "name": "NODE_ENV", "value": "dev" }, + { + "name": "S3_BUCKET_NAME", + "value": "ceramic-dev-cas" + }, { "name": "S3_ENDPOINT", "value": "http://localstack:4566" @@ -231,6 +235,10 @@ Request { "name": "MERKLE_CAR_STORAGE_MODE", "value": "s3" }, + { + "name": "S3_BUCKET_NAME", + "value": "ceramic-dev-cas" + }, { "name": "S3_ENDPOINT", "value": "http://localstack:4566"