kubernetes-models
Version:
24 lines (23 loc) • 1.16 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.IoK8sApiRbacV1RoleBinding = exports.RoleBinding = void 0;
const base_1 = require("@kubernetes-models/base");
const IoK8sApiRbacV1RoleBinding_1 = require("../../_schemas/IoK8sApiRbacV1RoleBinding.js");
/**
* RoleBinding references a role, but does not contain it. It can reference a Role in the same namespace or a ClusterRole in the global namespace. It adds who information via Subjects and namespace information by which namespace it exists in. RoleBindings in a given namespace only have effect in that namespace.
*/
class RoleBinding extends base_1.Model {
constructor(data) {
super({
apiVersion: RoleBinding.apiVersion,
kind: RoleBinding.kind,
...data
});
}
}
exports.RoleBinding = RoleBinding;
exports.IoK8sApiRbacV1RoleBinding = RoleBinding;
RoleBinding.apiVersion = "rbac.authorization.k8s.io/v1";
RoleBinding.kind = "RoleBinding";
RoleBinding.is = (0, base_1.createTypeMetaGuard)(RoleBinding);
(0, base_1.setSchema)(RoleBinding, "io.k8s.api.rbac.v1.RoleBinding", IoK8sApiRbacV1RoleBinding_1.addSchema);