corneliusweig / rakkess

Review Access - kubectl plugin to show an access matrix for k8s server resources
Apache License 2.0
1.3k stars 56 forks source link

Extend the `resource` to select a particular object #28

Closed corneliusweig closed 5 years ago

corneliusweig commented 5 years ago

Some role.rules are restricted to resources with a specific name. This PR extends the resource sub-command to accept an optional resourceName argument.

This also fixes a bug where rules with non-empty resourceNames were erroneously treated as wildcard matches.

Close #27

codecov-io commented 5 years ago

Codecov Report

Merging #28 into master will decrease coverage by 0.01%. The diff coverage is 72.22%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #28      +/-   ##
==========================================
- Coverage   72.13%   72.11%   -0.02%     
==========================================
  Files          16       16              
  Lines         671      685      +14     
==========================================
+ Hits          484      494      +10     
- Misses        163      167       +4     
  Partials       24       24
Impacted Files Coverage Δ
cmd/resource.go 30% <0%> (-20%) :arrow_down:
pkg/rakkess/client/resource_access.go 63.51% <100%> (ø) :arrow_up:
pkg/rakkess/client/result/subject.go 92.5% <100%> (+1.07%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 380a2de...75e373c. Read the comment docs.