fix: custom CA support for retention policies (#224)

Closes #220

Signed-off-by: Leonardo Cecchi <leonardo.cecchi@enterprisedb.com>
Signed-off-by: Marco Nenciarini <marco.nenciarini@enterprisedb.com>
Co-authored-by: Marco Nenciarini <marco.nenciarini@enterprisedb.com>
This commit is contained in:
Leonardo Cecchi 2025-03-24 18:21:47 +01:00 committed by GitHub
parent 78fe21b24d
commit bac7b673a2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 6 additions and 3 deletions

View File

@ -109,12 +109,14 @@ func (c *CatalogMaintenanceRunnable) maintenance(
return nil return nil
} }
env, err := barmanCredentials.EnvSetBackupCloudCredentials( env, err := barmanCredentials.EnvSetCloudCredentialsAndCertificates(
ctx, ctx,
c.Client, c.Client,
objectStore.Namespace, objectStore.Namespace,
&objectStore.Spec.Configuration, &objectStore.Spec.Configuration,
common.MergeEnv(os.Environ(), common.GetRestoreCABundleEnv(&objectStore.Spec.Configuration))) os.Environ(),
common.BuildCertificateFilePath(objectStore.Name),
)
if err != nil { if err != nil {
contextLogger.Error(err, "while setting backup cloud credentials") contextLogger.Error(err, "while setting backup cloud credentials")
return err return err

View File

@ -37,7 +37,8 @@ func (impl LifecycleImplementation) collectAdditionalCertificates(
result = append(result, envs...) result = append(result, envs...)
} }
if len(pluginConfiguration.RecoveryBarmanObjectName) > 0 { if len(pluginConfiguration.RecoveryBarmanObjectName) > 0 &&
pluginConfiguration.RecoveryBarmanObjectName != pluginConfiguration.BarmanObjectName {
envs, err := impl.collectObjectStoreCertificates( envs, err := impl.collectObjectStoreCertificates(
ctx, ctx,
types.NamespacedName{ types.NamespacedName{