Skip to content

Commit 9fca724

Browse files
authored
fix(canopy): set PGRO_REGION on the proxy sidecar from creds Secret (#85)
2 parents 7dbcaf2 + 03f6799 commit 9fca724

2 files changed

Lines changed: 16 additions & 0 deletions

File tree

src/controllers/replica/resources.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,14 @@ fi
213213
value: Some(backup_type.clone()),
214214
..Default::default()
215215
},
216+
// Region comes from the canopy-creds Secret the syncer
217+
// materialises alongside this Job; the sidecar signs S3
218+
// requests for it before forwarding upstream.
219+
crate::controllers::jobs::env_from_secret_name(
220+
"PGRO_REGION",
221+
source.secret_name(),
222+
"region",
223+
),
216224
EnvVar {
217225
name: "PGRO_STATS_CALLBACK_URL".to_string(),
218226
value: Some(proxy.stats_callback_url.to_string()),

src/controllers/restore/builders.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -821,6 +821,14 @@ echo -n "$VERSION" > /dev/termination-log
821821
value: Some(backup_type.clone()),
822822
..Default::default()
823823
},
824+
// Region comes from the canopy-creds Secret the syncer
825+
// materialises alongside this Job; the sidecar signs S3
826+
// requests for it before forwarding upstream.
827+
crate::controllers::jobs::env_from_secret_name(
828+
"PGRO_REGION",
829+
source.secret_name(),
830+
"region",
831+
),
824832
EnvVar {
825833
name: "PGRO_STATS_CALLBACK_URL".to_string(),
826834
value: Some(proxy.stats_callback_url.to_string()),

0 commit comments

Comments
 (0)