UNPKG

k8ts

Version:

Powerful framework for building Kubernetes manifests in TypeScript.

32 lines 1 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.ClusterRoleBinding = void 0; const instruments_1 = require("@k8ts/instruments"); const rbac_1 = require("../../kinds/rbac"); class ClusterRoleBinding extends instruments_1.Resource_Top { get kind() { return rbac_1.rbac.v1.ClusterRoleBinding._; } __needs__() { return { role: this.props.$role, subjects: this.props.$subjects }; } body() { return { roleRef: { apiGroup: this.props.$role.kind.parent.parent.text, kind: this.props.$role.kind.name, name: this.props.$role.name }, subjects: this.props.$subjects.map(sa => ({ kind: sa.kind.name, name: sa.name, namespace: sa.namespace })) }; } } exports.ClusterRoleBinding = ClusterRoleBinding; //# sourceMappingURL=cluster-role-binding.js.map