client
client copied to clipboard
Populate container.SecurityContext.RunAsUser when --user flag is used
Description
Changes
- Setting container's RunAsUser field based on the
--userflag at the end so it does not reinitialize the security context
Reference
Fixes #1926
Release Note
Codecov Report
Attention: Patch coverage is 71.42857% with 2 lines in your changes are missing coverage. Please review.
Project coverage is 76.83%. Comparing base (
9ef220c) to head (34e2c3f). Report is 7 commits behind head on main.
| Files | Patch % | Lines |
|---|---|---|
| pkg/kn/flags/podspec.go | 50.00% | 1 Missing and 1 partial :warning: |
Additional details and impacted files
@@ Coverage Diff @@
## main #1927 +/- ##
==========================================
+ Coverage 74.58% 76.83% +2.25%
==========================================
Files 207 207
Lines 15563 12753 -2810
==========================================
- Hits 11607 9799 -1808
+ Misses 3167 2165 -1002
Partials 789 789
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
It would be nice to have a simple unit tests for the change.
@vyasgun gentle ping. If you could check my comments, pls. I'd like to make sure both --user flag and --security-context flags understand each other.
Thanks for the review, @dsimansk! Updated the PR with a small change which will test both flags together.
/approve /lgtm
[APPROVALNOTIFIER] This PR is APPROVED
This pull-request has been approved by: dsimansk, vyasgun
The full list of commands accepted by this bot can be found here.
The pull request process is described here
- ~~OWNERS~~ [dsimansk,vyasgun]
Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment
/retest
@vyasgun I still have a small hesitation how to fix the issue actually. Maybe the --security-context should behave differently. To be able to merge with existing values etc.