k8ts
Version:
Powerful framework for building Kubernetes manifests in TypeScript.
25 lines • 965 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.NodeGraphValidator = void 0;
const cdk8s_1 = require("cdk8s");
const equiv_cdk8s_1 = require("../../node/equiv-cdk8s");
class NodeGraphValidator {
options;
constructor(options) {
this.options = options;
}
validate(collection) {
const app = new cdk8s_1.App();
const rootChart = new cdk8s_1.Chart(app, "root_chart");
for (const fileNode of collection) {
for (const nodeManifest of fileNode.resources) {
const equiv = equiv_cdk8s_1.EquivCdk8s.get(nodeManifest.node._entity);
const fullFqn = nodeManifest.node.fullFqn.replaceAll("/", "_").replaceAll(".", "-");
const cdk8sNode = new equiv(rootChart, fullFqn, nodeManifest.manifest);
}
}
app.synthYaml();
}
}
exports.NodeGraphValidator = NodeGraphValidator;
//# sourceMappingURL=validator.js.map