feat: revamp and use single namespace and update to latest versions
This commit is contained in:
@@ -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: {
|
||||
|
||||
Reference in New Issue
Block a user