24 lines
580 B
TypeScript
24 lines
580 B
TypeScript
import { HelmProvider } from "@cdktf/provider-helm/lib/provider";
|
|
import { Release } from "@cdktf/provider-helm/lib/release";
|
|
import { Construct } from "constructs";
|
|
|
|
type MetalLBOptions = {
|
|
provider: HelmProvider;
|
|
name: string;
|
|
namespace: string;
|
|
version: string;
|
|
};
|
|
|
|
export class MetalLB extends Construct {
|
|
constructor(scope: Construct, id: string, options: MetalLBOptions) {
|
|
super(scope, id);
|
|
|
|
new Release(this, id, {
|
|
...options,
|
|
repository: "https://metallb.github.io/metallb",
|
|
chart: "metallb",
|
|
createNamespace: true,
|
|
});
|
|
}
|
|
}
|