Skip to content

Commit 061f8b0

Browse files
authored
CLONE_WALG_LIBSODIUM_KEY (#480)
* Also set the CLONE_WALG_LIBSODIUM_KEY variable * Remove comment after discussion * Add when neccessary, remove when possible
1 parent b129115 commit 061f8b0

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

controllers/postgres_controller.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -527,6 +527,12 @@ func (r *PostgresReconciler) updatePodEnvironmentSecret(ctx context.Context, p *
527527
return fmt.Errorf("wal_g encryption key must be exactly 32 bytes, got %v", len(k))
528528
}
529529
data["WALG_LIBSODIUM_KEY"] = k
530+
531+
if p.Spec.PostgresRestore != nil {
532+
data["CLONE_WALG_LIBSODIUM_KEY"] = k
533+
} else {
534+
delete(data, "CLONE_WALG_LIBSODIUM_KEY")
535+
}
530536
}
531537

532538
var s *corev1.Secret

0 commit comments

Comments
 (0)