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 NginxOptions = { provider: HelmProvider; name: string; namespace: string; version: string; }; export class Nginx extends Construct { constructor(scope: Construct, id: string, options: NginxOptions) { super(scope, id); new Release(this, id, { ...options, repository: "https://kubernetes.github.io/ingress-nginx", chart: "ingress-nginx", createNamespace: true, values: [ fs.readFileSync("helm/values/nginx-internal.values.yaml", { encoding: "utf8", }), ], }); } }