feat: organize all services into separate stacks by dependency

This commit is contained in:
2025-11-22 17:51:58 +05:00
parent 06a316f1e6
commit a25c25afc4
30 changed files with 2513 additions and 386 deletions

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