WARNING: this is unstable. Pushes will be straight to main until 1.0.0.
rules_cdk8s generates yamls from cdk8s code.
cdk8s_charts(
name = "main",
# optionally can depend on npm packages...
deps = [
"@is-odd__3.0.1//:package",
],
# cdk8s code
srcs = [
"local-lib.ts",
"main.ts",
],
# generates these kubernetes manifests!
outs = [
"a.yaml",
"b.yaml",
],
)A full, working example can be found in the e2e/smoke folder.
A large repository that generates a large number of manifests should split into many smaller cdk8s_charts, and then joined together. The package structure should look something like this:
graph TD
A[Package A] --> Lib[Package lib]
B[Package B] --> Lib[Package lib]