Documentation ¶
Overview ¶
Package rbac contain libraries for generating RBAC manifests from RBAC markers in Go source files.
The markers take the form:
+kubebuilder:rbac:groups=<groups>,resources=<resources>,verbs=<verbs>,urls=<non resource urls>
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // RuleDefinition is a marker for defining RBAC rules. // Call ToRule on the value to get a Kubernetes RBAC policy rule. RuleDefinition = markers.Must(markers.MakeDefinition("kubebuilder:rbac", markers.DescribesPackage, Rule{})) )
Functions ¶
This section is empty.
Types ¶
type Generator ¶ added in v0.2.0
type Generator struct {
RoleName string
}
Generator is a genall.Generator that generated RBAC manifests..
type Rule ¶ added in v0.2.0
type Rule struct { Groups []string `marker:",optional"` Resources []string `marker:",optional"` Verbs []string URLs []string `marker:"urls,optional"` }
Rule is a marker value that describes a kubernetes RBAC rule.
func (Rule) ToRule ¶ added in v0.2.0
func (r Rule) ToRule() rbacv1.PolicyRule
ToRule converts this rule to its Kubernetes API form.
Click to show internal directories.
Click to hide internal directories.