feat: CDKTF | migrate memcached to cdktf

This commit is contained in:
2025-07-15 12:12:40 +05:00
parent d8da2c3c05
commit 8b191095b2
4 changed files with 35 additions and 12 deletions

28
memcached/index.ts Normal file
View File

@@ -0,0 +1,28 @@
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 MemcachedClusterOptions = {
provider: HelmProvider;
name: string;
namespace: string;
};
export class MemcachedCluster extends Construct {
constructor(scope: Construct, id: string, options: MemcachedClusterOptions) {
super(scope, id);
new Release(this, id, {
...options,
repository: "https://charts.bitnami.com/bitnami",
chart: "memcached",
createNamespace: true,
values: [
fs.readFileSync("helm/values/memcached.values.yaml", {
encoding: "utf8",
}),
],
});
}
}