1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00
lens/dashboard/client/api/endpoints/role.api.ts
Sebastian Malton b1ff34879a cleanup Lens repo with tighter linting
Signed-off-by: Sebastian Malton <smalton@mirantis.com>
2020-07-09 17:00:23 -04:00

27 lines
502 B
TypeScript

import { KubeObject } from "../kube-object";
import { KubeApi } from "../kube-api";
export interface Rule {
verbs: string[];
apiGroups: string[];
resources: string[];
resourceNames?: string[];
}
export class Role extends KubeObject {
static kind = "Role"
rules: Rule[]
getRules(): Rule[] {
return this.rules;
}
}
export const roleApi = new KubeApi({
kind: Role.kind,
apiBase: "/apis/rbac.authorization.k8s.io/v1/roles",
isNamespaced: true,
objectConstructor: Role,
});