Revert "feat: add barman plugin into postgres cluster"
This reverts commit ed6ef99bb7.
This commit is contained in:
@@ -17,7 +17,6 @@ type PostgresClusterOptions = {
|
|||||||
initSecretName: string;
|
initSecretName: string;
|
||||||
certManagerApiVersion: string;
|
certManagerApiVersion: string;
|
||||||
version: string;
|
version: string;
|
||||||
backupR2EndpointURL: string;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
export class PostgresCluster extends Construct {
|
export class PostgresCluster extends Construct {
|
||||||
@@ -35,44 +34,6 @@ export class PostgresCluster extends Construct {
|
|||||||
namespace: options.namespace,
|
namespace: options.namespace,
|
||||||
});
|
});
|
||||||
|
|
||||||
const destinationPath = "s3://rihla-backups/";
|
|
||||||
|
|
||||||
const endpointURL = options.backupR2EndpointURL;
|
|
||||||
const barmanConfiguration = {
|
|
||||||
destinationPath,
|
|
||||||
endpointURL,
|
|
||||||
s3Credentials: {
|
|
||||||
accessKeyId: {
|
|
||||||
name: "cloudflare-r2-token",
|
|
||||||
key: "access_key",
|
|
||||||
},
|
|
||||||
secretAccessKey: {
|
|
||||||
name: "cloudflare-r2-token",
|
|
||||||
key: "secret_key",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
};
|
|
||||||
|
|
||||||
new Manifest(this, "r2-backup-store", {
|
|
||||||
provider: kubernetes,
|
|
||||||
manifest: {
|
|
||||||
apiVersion: "barmancloud.cnpg.io/v1",
|
|
||||||
kind: "ObjectStore",
|
|
||||||
metadata: {
|
|
||||||
namespace: options.namespace,
|
|
||||||
name: "r2-postgres-backup-store",
|
|
||||||
},
|
|
||||||
spec: {
|
|
||||||
configuration: {
|
|
||||||
...barmanConfiguration,
|
|
||||||
wal: {
|
|
||||||
compression: "gzip",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
});
|
|
||||||
|
|
||||||
const { certManagerApiVersion } = options;
|
const { certManagerApiVersion } = options;
|
||||||
|
|
||||||
const certNames = {
|
const certNames = {
|
||||||
@@ -335,15 +296,6 @@ export class PostgresCluster extends Construct {
|
|||||||
"hostssl sameuser all all cert",
|
"hostssl sameuser all all cert",
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
plugins: [
|
|
||||||
{
|
|
||||||
name: "barman-cloud.cloudnative-pg.io",
|
|
||||||
isWALArchiver: true,
|
|
||||||
parameters: {
|
|
||||||
barmanObjectName: "r2-postgres-backup-store",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
],
|
|
||||||
enableSuperuserAccess: false,
|
enableSuperuserAccess: false,
|
||||||
bootstrap: {
|
bootstrap: {
|
||||||
initdb: {
|
initdb: {
|
||||||
|
|||||||
Reference in New Issue
Block a user