UNPKG

k8ts

Version:

Powerful framework for building Kubernetes manifests in TypeScript.

36 lines 972 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.parseBackend = parseBackend; const error_1 = require("../../../error"); function parseBackend(backend) { switch (backend?.type) { case undefined: case null: return {}; case "HostPath": return { hostPath: { path: backend.path, type: backend.hostpathType } }; case "Local": return { local: { path: backend.path } }; case "NFS": return { nfs: { server: backend.server, path: backend.path } }; default: throw new error_1.MakeError(`Unknown backend kind!`, { backend }); } } //# sourceMappingURL=parse-backend.js.map