INNER CODE UNIT · Go
NewCommandAuditGen
alcideio/rbac-tool · cmd/auditgen_cmd.go:20
func NewCommandAuditGen() *cobra.Command {
options := &AuditGenOpts{
GeneratedPath: ".",
ExpandMultipleNamespacesToClusterScoped: true,
ExpandMultipleNamesToUnnamed: true,
Annotations: map[string]string{
"insightcloudsec.rapid7.com/generated-by": "rbac-tool",
"insightcloudsec.rapid7.com/generated": time.Now().Format(time.RFC3339),
},
}
cmd := &cobra.Command{
Use: "auditgen",
Aliases: []string{"audit2rbac", "audit", "audit-gen", "a"},
Short: "Generate RBAC policy from Kubernetes audit events",
Long: "Generate RBAC policy from Kubernetes audit events",
Example: `