fix: update external dns and move pihole out of k8s cluster

This commit is contained in:
2025-11-15 13:15:04 +05:00
parent 22586fbdd3
commit db25a0ea79
4 changed files with 23 additions and 130 deletions

27
external-dns/index.ts Normal file
View File

@@ -0,0 +1,27 @@
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 ExternalDNSOptions = {
provider: HelmProvider;
name: string;
namespace: string;
};
export class ExternalDNS extends Construct {
constructor(scope: Construct, id: string, options: ExternalDNSOptions) {
super(scope, id);
new Release(this, "external-dns", {
...options,
repository: "oci://registry-1.docker.io/bitnamicharts/",
chart: "external-dns",
values: [
fs.readFileSync("helm/values/externaldns.values.yaml", {
encoding: "utf8",
}),
],
});
}
}