Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
rename config value
Browse files Browse the repository at this point in the history
nhudson committed Nov 1, 2024
1 parent 20e4c39 commit b267246
Showing 3 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions tembo-operator/src/cloudnativepg/cnpg.rs
Original file line number Diff line number Diff line change
@@ -3499,7 +3499,7 @@ mod tests {
enable_volume_snapshot: true,
reconcile_ttl: 30,
reconcile_timestamp_ttl: 90,
volume_snapshot_rentention_period: 40,
volume_snapshot_retention_period_days: 40,
};

// Test with backups enabled and valid path
@@ -3546,7 +3546,7 @@ mod tests {
enable_volume_snapshot: false,
reconcile_ttl: 30,
reconcile_timestamp_ttl: 90,
volume_snapshot_rentention_period: 40,
volume_snapshot_retention_period_days: 40,
};
let (backup, template) = cnpg_backup_configuration(&cdb, &cfg_disabled);
assert!(backup.is_none());
@@ -3695,7 +3695,7 @@ mod tests {
enable_volume_snapshot: true,
reconcile_ttl: 30,
reconcile_timestamp_ttl: 90,
volume_snapshot_rentention_period: 40,
volume_snapshot_retention_period_days: 40,
};

// Test with backups enabled and valid path
@@ -3750,7 +3750,7 @@ mod tests {
enable_volume_snapshot: false,
reconcile_ttl: 30,
reconcile_timestamp_ttl: 90,
volume_snapshot_rentention_period: 40,
volume_snapshot_retention_period_days: 40,
};
let (backup, template) = cnpg_backup_configuration(&cdb, &cfg_disabled);
assert!(backup.is_none());
6 changes: 3 additions & 3 deletions tembo-operator/src/config.rs
Original file line number Diff line number Diff line change
@@ -4,7 +4,7 @@ use std::env;
pub struct Config {
pub enable_backup: bool,
pub enable_volume_snapshot: bool,
pub volume_snapshot_rentention_period: u64,
pub volume_snapshot_retention_period_days: u64,
pub reconcile_timestamp_ttl: u64,
pub reconcile_ttl: u64,
}
@@ -16,8 +16,8 @@ impl Default for Config {
enable_volume_snapshot: from_env_default("ENABLE_VOLUME_SNAPSHOT", "false")
.parse()
.unwrap(),
volume_snapshot_rentention_period: from_env_default(
"VOLUME_SNAPSHOT_RETENTION_PERIOD",
volume_snapshot_retention_period_days: from_env_default(
"VOLUME_SNAPSHOT_RETENTION_PERIOD_DAYS",
"40",
)
.parse()
2 changes: 1 addition & 1 deletion tembo-operator/src/controller.rs
Original file line number Diff line number Diff line change
@@ -426,7 +426,7 @@ impl CoreDB {
match cleanup_old_volume_snapshots(
self,
ctx.clone(),
cfg.volume_snapshot_rentention_period,
cfg.volume_snapshot_retention_period_days,
)
.await
{

0 comments on commit b267246

Please sign in to comment.