eks-anywhere
eks-anywhere copied to clipboard
feat(CLI): Add ValidateFileOrEnv function in kubeconfig package
ValidateFileOrEnv validates a given kubeconfig filename, or, if and only if that filename is an empty string, falls back to a kubeconfig filename from the environment, and validates it.
This should be useful for CLI commands that want to find the first specified kubeconfig file that's fit to use.
While this isn't used yet, my next PR will use it. :)
Issue #, if available:
Description of changes:
Testing (if applicable):
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
Codecov Report
Merging #3309 (7553a55) into main (629d786) will increase coverage by
0.02%. The diff coverage is100.00%.
@@ Coverage Diff @@
## main #3309 +/- ##
==========================================
+ Coverage 64.41% 64.44% +0.02%
==========================================
Files 352 352
Lines 27980 28001 +21
==========================================
+ Hits 18023 18044 +21
Misses 8648 8648
Partials 1309 1309
| Impacted Files | Coverage Δ | |
|---|---|---|
| pkg/kubeconfig/kubeconfig.go | 95.34% <100.00%> (+4.43%) |
:arrow_up: |
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.
/approve
/approve /lgtm
[APPROVALNOTIFIER] This PR is APPROVED
This pull-request has been approved by: a-cool-train, ewollesen
The full list of commands accepted by this bot can be found here.
The pull request process is described here
- ~~OWNERS~~ [a-cool-train,ewollesen]
Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment