-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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 write-kubeconfig-group flag to server #9233
Conversation
https://systemd.io/USER_NAMES/ seems like a good reference document
I would suggest:
If someone has a group with a numeric name, that conflicts with the ID of a different group, that is a problem they will have to solve on their own. Preventing that is why most sane systems require group names to start with a letter. |
Awesome! 👍 I don't know enough about BSD land or Apple land, and who knows other OS' or unique distros, but generally speaking as long as we are saying known issue / goes against common ground rules for naming so we won't take into consideration, I'm happy to implement the magic. I'll update this PR with your suggestions @brandond |
Now that I think about this, perhaps we should skip looking up numeric IDs - |
Signed-off-by: Katherine Pata <me@kitty.sh>
4dccc8d
to
6ae0b66
Compare
Apologies for the delay, life got in the way. I've modified the feature as requested. If there are any style changes, better organization across files, or whatever else, please let me know. I'll try and get to it asap :) This should also be documented on the website and perhaps other places? Also, some test to cover this code would be helpful, no idea what is preferred in actual implementation of this though. |
Signed-off-by: Katherine Pata <me@kitty.sh>
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #9233 +/- ##
==========================================
- Coverage 50.07% 43.56% -6.51%
==========================================
Files 158 158
Lines 14032 14049 +17
==========================================
- Hits 7027 6121 -906
- Misses 5676 6764 +1088
+ Partials 1329 1164 -165
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
@brandond a friendly hello :) Is this PR waiting for anything from my side, or just low-prio so waiting till you or someone else can get around to it? |
We are in an extended code freeze due to overlapping release cycles. We will merge non essential things again soon, probably sometime this coming week. |
* Add write-kubeconfig-group flag to server * update kubectl unable to read config message for kubeconfig mode/group Signed-off-by: Katherine Pata <me@kitty.sh> (cherry picked from commit 7a0ea3c) Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
* Add write-kubeconfig-group flag to server * update kubectl unable to read config message for kubeconfig mode/group Signed-off-by: Katherine Pata <me@kitty.sh> (cherry picked from commit 7a0ea3c) Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
* Add write-kubeconfig-group flag to server * update kubectl unable to read config message for kubeconfig mode/group Signed-off-by: Katherine Pata <me@kitty.sh> (cherry picked from commit 7a0ea3c) Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
* Add write-kubeconfig-group flag to server * update kubectl unable to read config message for kubeconfig mode/group Signed-off-by: Katherine Pata <me@kitty.sh> (cherry picked from commit 7a0ea3c) Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
* Add write-kubeconfig-group flag to server * update kubectl unable to read config message for kubeconfig mode/group Signed-off-by: Katherine Pata <me@kitty.sh> (cherry picked from commit 7a0ea3c) Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
* Add write-kubeconfig-group flag to server * update kubectl unable to read config message for kubeconfig mode/group Signed-off-by: Katherine Pata <me@kitty.sh> (cherry picked from commit 7a0ea3c) Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
* Add write-kubeconfig-group flag to server * update kubectl unable to read config message for kubeconfig mode/group Signed-off-by: Katherine Pata <me@kitty.sh> (cherry picked from commit 7a0ea3c) Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
* Add write-kubeconfig-group flag to server * update kubectl unable to read config message for kubeconfig mode/group Signed-off-by: Katherine Pata <me@kitty.sh> (cherry picked from commit 7a0ea3c) Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
* Add write-kubeconfig-group flag to server * update kubectl unable to read config message for kubeconfig mode/group Signed-off-by: Katherine Pata <me@kitty.sh> (cherry picked from commit 7a0ea3c) Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
Proposed Changes
Add the flag as discussed in issue #9209 in order to enable configuring of group for writing kubeconfig.
Types of Changes
New Feature
Verification
Manually run k3s server with the flag
--write-kubeconfig-group
and check if kubeconfig has appropriate groups.Testing
It seems there is no relevant test I found for write-kubeconfig-mode (other than it incidentally being used in some tests. If there is a request for tests please point me in the right direction!
Linked Issues
User-Facing Change
Yes, it creates a new optional flag.
Further Comments
Unfortunately, my laptop doesn't have Linux on it at the moment (due to some suspend issues with new hardware support I'm procrastinating), and under WSL2 I'm having trouble running the final binary to test whether this commit works. Once I have time again I will try this in a VM or on baremetal linux and update here with any changes needed.