aws-cli
aws-cli copied to clipboard
feat: Add Support for creating user entries with alias flag
*Issue #, if available: Fixes #5164
*Description of changes: Added support for creating user name in kube-config with alias (simliar to the way context works with alias) Added appropriate testing for user name creation with and without alias flag
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
@kyleknap @elysahall Anything else I can do for this PR?
@elijah-roberts in your example from the issue, the context name is set to the same value as the user name. Is that missing from this PR?
Nvm, I think I see how it works now, alias was already provided as a flag to set context name. While using alias for both username and context name would work, it seems like we could add a --user flag and not worry about breaking any users relying on the current behavior.
Hi @elijah-roberts, can you address @nckturner's suggestions?
Nvm, I think I see how it works now, alias was already provided as a flag to set context name. While using alias for both username and context name would work, it seems like we could add a
--userflag and not worry about breaking any users relying on the current behavior.
That would work for me 👍 I can plan on implementing a flag and testing that out.
Codecov Report
Merging #5165 into develop will decrease coverage by
1.45%. The diff coverage is100.00%.
@@ Coverage Diff @@
## develop #5165 +/- ##
===========================================
- Coverage 93.97% 92.52% -1.46%
===========================================
Files 188 196 +8
Lines 14548 15898 +1350
===========================================
+ Hits 13672 14709 +1037
- Misses 876 1189 +313
| Impacted Files | Coverage Δ | |
|---|---|---|
| awscli/customizations/eks/update_kubeconfig.py | 97.93% <100.00%> (ø) |
|
| awscli/testutils.py | 64.42% <0.00%> (-0.36%) |
:arrow_down: |
| awscli/help.py | 96.48% <0.00%> (ø) |
|
| awscli/handlers.py | 100.00% <0.00%> (ø) |
|
| awscli/customizations/commands.py | 99.56% <0.00%> (ø) |
|
| awscli/customizations/s3/fileinfo.py | 100.00% <0.00%> (ø) |
|
| awscli/customizations/emr/helptext.py | 100.00% <0.00%> (ø) |
|
| awscli/customizations/emr/argumentschema.py | 100.00% <0.00%> (ø) |
|
| awscli/customizations/emr/instancefleetsutils.py | 100.00% <0.00%> (ø) |
|
| ... and 16 more |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact),ø = not affected,? = missing dataPowered by Codecov. Last update 2d07d7c...9968a77. Read the comment docs.
@nckturner @kdaily I appreciate your reviewing my PR. I updated with the changes you suggested by breaking out this logic into a new flag user-alias. I have updated tests, and confirmed that it is working as expected for myself.
@nckturner @kdaily Looks like the codecov/project failed despite the fact that I added testes for the code that I added. Is there something else that I need to do?
@nckturner - let me know here if this is good to go!
@elijah-roberts - I'll look into the coverage failure.
Thanks both!
Bump... @kdaily Any update on this?
@kdaily this LGTM
My team could really use this feature. @kdaily is this going to be merged?
Thanks!
+1 waiting for this to be merged. Any updates @kdaily?
@joaoubaldo, @potto007, @elijah-roberts - this feature still needs review from the CLI team, and it is on the agenda for review. Marking it as such now. It's on the radar, but I don't know when it will be able to pull in.
+1 - This feature would be a welcome addition
Is there any chance it's merged? @kdaily We've faced an issue when the current behavior overrides existing users in the kube config file.
@joaoubaldo, @potto007, @kdaily bumping, @nckturner again, this is a simple non-breaking change that is useful for supporting the creation of multiple kube-configs for different roles. For enterprise EKS users typically there will be a daily role that has limited permissions, and mappings. There will also be a break-glass type admin role. Current state to support both of these you have to manually manage your kubeconfig file, or constantly overwrite the associated user each time you update the config with a different role.
Any chance we can get a review on this ? I am happy to make any necessary changes.
Codecov Report
Merging #5165 (a575e2d) into develop (c05713e) will increase coverage by
0.00%. The diff coverage is0.00%.
@@ Coverage Diff @@
## develop #5165 +/- ##
=======================================
Coverage 0.08% 0.08%
=======================================
Files 206 206
Lines 16488 16483 -5
=======================================
Hits 14 14
+ Misses 16474 16469 -5
| Impacted Files | Coverage Δ | |
|---|---|---|
| awscli/customizations/eks/update_kubeconfig.py | 0.00% <0.00%> (ø) |
... and 5 files with indirect coverage changes
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.
Pulled in latest changes from develop, and the code coverage report looks good now
Any chance to get this merged?
We are trying to prioritize this feature request and get it merged soon. Note that this implements the same feature as #5413
We are trying to prioritize this feature request and get it merged soon. Note that this implements the same feature as #5413
Thanks but that issue has also been open for the best part of 3 years. What's the holdup?