feat: CDKTF | migrate longhorn to cdktf

This commit is contained in:
2025-07-15 09:10:04 +05:00
parent 5bfb72ef81
commit 452cfe37df
6 changed files with 77 additions and 13 deletions

29
gitea/index.ts Normal file
View File

@@ -0,0 +1,29 @@
import * as fs from "fs";
import { HelmProvider } from "@cdktf/provider-helm/lib/provider";
import { Release } from "@cdktf/provider-helm/lib/release";
import { Construct } from "constructs";
type GiteaServerOptions = {
provider: HelmProvider;
version: string;
name: string;
namespace: string;
};
export class GiteaServer extends Construct {
constructor(scope: Construct, id: string, options: GiteaServerOptions) {
super(scope, id);
new Release(this, id, {
...options,
repository: "https://dl.gitea.com/charts",
chart: "gitea",
createNamespace: true,
values: [
fs.readFileSync("helm/values/gitea.values.yaml", {
encoding: "utf8",
}),
],
});
}
}