UNPKG

@atomist/sdm

Version:

Atomist Software Delivery Machine SDK

24 lines 993 B
import * as k8s from "@kubernetes/client-node"; import { KubernetesResourceRequest } from "./request"; /** * Package the RBAC resource specs. */ export interface RbacResources { role?: k8s.V1Role | k8s.V1ClusterRole; roleBinding?: k8s.V1RoleBinding | k8s.V1ClusterRoleBinding; serviceAccount?: k8s.V1ServiceAccount; } /** * Create requested RBAC resources if they do not exist. If * `req.roleSpec` is truthy, the service account, role, and binding * are created. If `req.roleSpect` is falsey but * `req.serviceAccountSpec` is truthy, only the service account is * created. If any of the RBAC resources exist and their * corresponding partial spec is provided in `req`, the resource is * patched. * * @param req Kuberenetes application request * @return Kubernetes RBAC resource specs that were created or patched, some may be undefined */ export declare function upsertRbac(req: KubernetesResourceRequest): Promise<RbacResources>; //# sourceMappingURL=rbac.d.ts.map