Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add ability to audit a single workload #368

Merged
merged 4 commits into from
Jul 22, 2020
Merged

add ability to audit a single workload #368

merged 4 commits into from
Jul 22, 2020

Conversation

rbren
Copy link
Contributor

@rbren rbren commented Jun 30, 2020

Sadly I haven't been able to test this - I can't get DynamicClient to work properly in test mode. Any ideas would be appreciated.

@codecov
Copy link

codecov bot commented Jun 30, 2020

Codecov Report

Merging #368 into master will decrease coverage by 5.27%.
The diff coverage is 24.57%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #368      +/-   ##
==========================================
- Coverage   53.55%   48.27%   -5.28%     
==========================================
  Files          12       12              
  Lines         732      812      +80     
==========================================
  Hits          392      392              
- Misses        285      365      +80     
  Partials       55       55              
Impacted Files Coverage Δ
pkg/kube/resources.go 47.76% <0.00%> (-17.30%) ⬇️
pkg/kube/workload.go 32.37% <42.02%> (+5.34%) ⬆️

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 b3d323d...38a9ba6. Read the comment docs.

Copy link
Contributor

@baderbuddy baderbuddy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is looking good except that inconsistency. I wonder if we could infer version somehow.... I haven't found a good way to mock out the dynamic client yet, maybe stuff like that needs to stay in the realm of e2e tests?


parts := strings.Split(workload, "/")
if len(parts) != 4 {
return nil, fmt.Errorf("Invalid workload identifier %s. Should be in format namespace/kind/version/name, e.g. nginx-ingress/Deployment.apps/v1/default-backend", workload)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the help text you ask for 3 pieces (namespace/kind/name) instead of including version.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good catch! Fixed.

Copy link
Contributor

@baderbuddy baderbuddy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@rbren rbren force-pushed the rb/single-workload branch from 79cdb9d to 38a9ba6 Compare July 21, 2020 14:54
@rbren rbren merged commit 4715015 into master Jul 22, 2020
@rbren rbren deleted the rb/single-workload branch July 22, 2020 17:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants