Aggregate ClusterRole and Role rules from a directory of YAMLs into a single ClusterRole.
go run *.go \
--dir /path/to/clusterroles \
--chart /path/to/chart-a \
--chart /path/to/chart-b \
--name combined-roles \
--output /path/to/combined.yamlIf --output is not set, the aggregated YAML is written to stdout.
- Only
ClusterRoleandRoleobjects are processed; other kinds are ignored. - Each
--chartdirectory is rendered withhelm templatebefore processing. - Rules are aggregated by apiGroup, resource, and resourceNames. Non-resource URLs are aggregated separately.
- Multiple YAML documents in a single file are supported.