Skip to content

Commit

Permalink
Fill in backup values
Browse files Browse the repository at this point in the history
Signed-off-by: Ian Stanton <ian@tembo.io>
  • Loading branch information
ianstanton committed Sep 26, 2024
1 parent 9892653 commit 9265eb0
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions tembo-operator/src/cloudnativepg/cnpg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2129,7 +2129,12 @@ fn generate_azure_backup_credentials(
// If we're not inheriting from Azure AD, assume we are reading from a Kubernetes secret.
// https://cloudnative-pg.io/documentation/1.16/backup_recovery/#azure-blob-storage
Some(ClusterBackupBarmanObjectStoreAzureCredentials {
connection_string: None,
connection_string: creds.connection_string.as_ref().map(|cs| {
ClusterBackupBarmanObjectStoreAzureCredentialsConnectionString {
key: cs.key.clone(),
name: cs.name.clone(),
}
}),
storage_account: creds.storage_account.as_ref().map(|sa| {
ClusterBackupBarmanObjectStoreAzureCredentialsStorageAccount {
key: sa.key.clone(),
Expand All @@ -2142,7 +2147,12 @@ fn generate_azure_backup_credentials(
name: sk.name.clone(),
}
}),
storage_sas_token: None,
storage_sas_token: creds.storage_sas_token.as_ref().map(|st| {
ClusterBackupBarmanObjectStoreAzureCredentialsStorageSasToken {
key: st.key.clone(),
name: st.name.clone(),
}
}),
inherit_from_azure_ad: None,
})
} else {
Expand Down

0 comments on commit 9265eb0

Please sign in to comment.