yunikorn-k8shim icon indicating copy to clipboard operation
yunikorn-k8shim copied to clipboard

[YUNIKORN-1334] Admission controller: look up user & group and add annotation if necessary

Open pbacsko opened this issue 2 years ago • 1 comments

What is this PR for?

If the userinfo annotation is missing, it has be added to the incoming workload. The existing mutation webhook will be extended with the necessary code which handles all types of workloads.

What type of PR is it?

  • [ ] - Bug Fix
  • [ ] - Improvement
  • [x] - Feature
  • [ ] - Documentation
  • [ ] - Hot Fix
  • [ ] - Refactoring

Todos

  • [ ] - Rebase on YUNIKORN-1338 once that PR is committed to master

What is the Jira issue?

https://issues.apache.org/jira/browse/YUNIKORN-1334

How should this be tested?

Screenshots (if appropriate)

Questions:

  • [ ] - The licenses files need update.
  • [ ] - There is breaking changes for older versions.
  • [ ] - It needs documentation.

pbacsko avatar Oct 13 '22 15:10 pbacsko

Codecov Report

Merging #469 (63e1c53) into master (3f90831) will increase coverage by 0.15%. The diff coverage is 85.00%.

@@            Coverage Diff             @@
##           master     #469      +/-   ##
==========================================
+ Coverage   66.98%   67.14%   +0.15%     
==========================================
  Files          42       44       +2     
  Lines        7300     7472     +172     
==========================================
+ Hits         4890     5017     +127     
- Misses       2234     2266      +32     
- Partials      176      189      +13     
Impacted Files Coverage Δ
pkg/plugin/admissioncontrollers/webhook/webhook.go 0.00% <0.00%> (ø)
...missioncontrollers/webhook/admission_controller.go 63.21% <74.13%> (+0.64%) :arrow_up:
...admissioncontrollers/webhook/metadata/usergroup.go 78.65% <86.48%> (ø)
...n/admissioncontrollers/webhook/metadata/extract.go 100.00% <100.00%> (ø)
...in/admissioncontrollers/webhook/metadata/labels.go 100.00% <100.00%> (ø)
...in/admissioncontrollers/webhook/webhook_manager.go 77.06% <100.00%> (+0.19%) :arrow_up:

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more

codecov[bot] avatar Oct 13 '22 15:10 codecov[bot]

committed #467, I think we can proceed with this one now

wilfred-s avatar Nov 10 '22 01:11 wilfred-s

looking good now, merging

wilfred-s avatar Nov 22 '22 12:11 wilfred-s