Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // Scheme knows about audit and rbac types Scheme = runtime.NewScheme() // Decoder knows how to decode audit and rbac objects Decoder runtime.Decoder )
View Source
var Version = "unknown"
Version holds the current version, and is overwritten by build flags
Functions ¶
Types ¶
type GenerateOptions ¶
type GenerateOptions struct { VerbExpansions map[string][]string ExpandMultipleNamesToUnnamed bool ExpandMultipleNamespacesToClusterScoped bool Name string Labels map[string]string Annotations map[string]string }
GenerateOptions specifies options for generating RBAC roles
func DefaultGenerateOptions ¶
func DefaultGenerateOptions() GenerateOptions
DefaultGenerateOptions returns default generation options
type Generator ¶
type Generator struct { Options GenerateOptions // contains filtered or unexported fields }
Generator allows generating a set of covering RBAC roles and bindings
func NewGenerator ¶
func NewGenerator(existing RBACObjects, requests []authorizer.AttributesRecord, options GenerateOptions) *Generator
NewGenerator creates a new Generator
func (*Generator) Generate ¶
func (g *Generator) Generate() *RBACObjects
Generate returns a set of RBAC roles and bindings that cover the specified requests
type RBACObjects ¶
type RBACObjects struct { Roles []*rbac.Role RoleBindings []*rbac.RoleBinding ClusterRoles []*rbac.ClusterRole ClusterRoleBindings []*rbac.ClusterRoleBinding }
RBACObjects holds lists of RBAC API objects
Click to show internal directories.
Click to hide internal directories.