felixfbecker / PSKubectl

kubectl with the power of the object pipeline
MIT License
61 stars 9 forks source link

feat: add support for Namespace Objects #58

Closed nopjmp closed 2 months ago

nopjmp commented 4 years ago

This adds the ability for the commands that take a namespace to take a namespace object. This allows for Get-KubeNamespace | Get-KubePod to be used and other situations.

While we are here, clean up the naming convention and leave an alias behind to prevent backwards compatibility problems. Additionally, use const strings for ParameterSetNames to give us a compiler warning if there is a typo.

These changes try to follow how Azure PowerShell is structured.

I should have put this work into a feature branch, but I'll just force push my master branch if this gets merged in and remember to do that in the future.

codecov[bot] commented 4 years ago

Codecov Report

Merging #58 into master will increase coverage by 0.54%. The diff coverage is 88.67%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #58      +/-   ##
==========================================
+ Coverage   71.66%   72.21%   +0.54%     
==========================================
  Files          25       25              
  Lines         600      619      +19     
==========================================
+ Hits          430      447      +17     
- Misses        170      172       +2
Impacted Files Coverage Δ
src/Cmdlets/GetKubeNamespaceCmdlet.cs 58.82% <ø> (ø) :arrow_up:
src/Cmdlets/GetKubeResourceCmdlet.cs 91.66% <100%> (+0.49%) :arrow_up:
src/Cmdlets/RemoveKubePodCmdlet.cs 91.17% <100%> (+1.17%) :arrow_up:
src/Cmdlets/GetKubeLogCmdlet.cs 70.37% <75%> (+2.37%) :arrow_up:
src/Cmdlets/GetKubeDeploymentCmdlet.cs 63.63% <75%> (+3.63%) :arrow_up:
src/Cmdlets/GetKubePodCmdlet.cs 63.63% <75%> (+3.63%) :arrow_up:
src/Cmdlets/RemoveKubeResourceCmdlet.cs 87.69% <86.95%> (-1.97%) :arrow_down:

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 59390ce...8c88b23. Read the comment docs.

nopjmp commented 2 months ago

Closing as I don't use this anymore