feat: revamp and use single namespace and update to latest versions

This commit is contained in:
2025-09-21 17:53:34 +05:00
parent 9b0434721b
commit cc90d7793a
18 changed files with 277 additions and 194 deletions

View File

@@ -10,7 +10,6 @@ type LonghornOptions = {
kubernetes: KubernetesProvider;
helm: HelmProvider;
};
version: string;
name: string;
namespace: string;
};
@@ -24,11 +23,11 @@ export class Longhorn extends Construct {
new Release(this, id, {
name: options.name,
namespace: options.namespace,
version: options.version,
provider: helm,
repository: "https://charts.longhorn.io",
chart: "longhorn",
createNamespace: true,
upgradeInstall: true,
values: [
fs.readFileSync("helm/values/longhorn.values.yaml", {
encoding: "utf8",
@@ -36,6 +35,25 @@ export class Longhorn extends Construct {
],
});
new Manifest(this, "recurring-backup-job", {
provider: kubernetes,
manifest: {
apiVersion: "longhorn.io/v1beta1",
kind: "RecurringJob",
metadata: {
name: "daily-backup",
namespace: options.namespace,
},
spec: {
cron: "0 0 * * *",
task: "backup",
retain: 30,
groups: ["default"],
concurrency: 3,
},
},
});
new Manifest(this, "longhorn-crypto-storage-class", {
provider: kubernetes,
manifest: {