package kubecaml

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

Policy_rule holds information that describes a policy rule, but does not contain information about who the rule applies to or which namespace the rule applies to.

type t
val to_yojson : t -> Yojson.Safe.t
val make : verbs:string list -> ?resources:string list -> ?resource_names:string list -> ?non_resource_urls:string list -> ?api_groups:string list -> unit -> t
val api_groups : t -> string list option

Api_groups is the name of the Api_group that contains the resources. If multiple Api groups are specified, any action requested against one of the enumerated resources in any Api group will be allowed.

val non_resource_urls : t -> string list option

Non_resource_urls is a set of partial urls that a user should have access to. *s are allowed, but only as the full, final step in the path This name is intentionally different than the internal type so that the Default_convert works nicely and because the ordering may be different. Since non_resource Urls are not namespaced, this field is only applicable for Cluster_roles referenced from a Cluster_role_binding. Rules can either apply to Api resources (such as "pods" or "secrets") or non_resource Url paths (such as "/api"), but not both.

val resource_names : t -> string list option

Resource_names is an optional white list of names that the rule applies to. An empty set means that everything is allowed.

val resources : t -> string list option

Resources is a list of resources this rule applies to. Resource_all represents all resources.

val verbs : t -> string list

Verbs is a list of Verbs that apply to All the Resource_kinds and Attribute_restrictions contained in this rule. Verb_all represents all kinds.

module Object : Object.S with type value := t
OCaml

Innovation. Community. Security.