k8ts
Version:
Powerful framework for building Kubernetes manifests in TypeScript.
35 lines • 1.06 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.HttpRoute = void 0;
const instruments_1 = require("@k8ts/instruments");
const gateway_1 = require("../../kinds/gateway");
const GatewayKind = gateway_1.gateway.v1.Gateway._;
const HttpRouteKind = gateway_1.gateway.v1.HttpRoute._;
class HttpRoute extends instruments_1.Resource_Top {
get kind() {
return HttpRouteKind;
}
body() {
const self = this;
return {
spec: {
parentRefs: [self.props.$gateway.ref()],
hostnames: [self.props.$hostname],
rules: [
{
backendRefs: [self.props.$backend.ref()],
filters: self.props._filters
}
]
}
};
}
__needs__() {
return {
gateway: this.props.$gateway,
service: this.props.$backend.service
};
}
}
exports.HttpRoute = HttpRoute;
//# sourceMappingURL=http-route.js.map