Skip to content
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

fix: Parse flags before loading kubeconfig #494

Merged
merged 1 commit into from
Jan 16, 2025
Merged

Conversation

dlipovetsky
Copy link
Contributor

What this PR does / why we need it:
To respect the --kubeconfig flag, we must parse it before loading the kubeconfig.

This fixes a bug introduced by #383, where we begin parsing flags after loading the kubeconfig.

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes #

How Has This Been Tested?:

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration and test output

Special notes for your reviewer:

Please confirm that if this PR changes any image versions, then that's the sole change this PR makes.

Release note:


main.go Show resolved Hide resolved
Copy link

codecov bot commented Jan 15, 2025

Codecov Report

Attention: Patch coverage is 0% with 7 lines in your changes missing coverage. Please review.

Project coverage is 33.45%. Comparing base (c623231) to head (296a534).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
main.go 0.00% 7 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #494      +/-   ##
==========================================
- Coverage   33.46%   33.45%   -0.02%     
==========================================
  Files          17       17              
  Lines        2235     2236       +1     
==========================================
  Hits          748      748              
- Misses       1467     1468       +1     
  Partials       20       20              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@thunderboltsid
Copy link
Contributor

tests seem to be failing due to CVEs: fixed in #495

To respect the --kubeconfig flag, we must parse it before loading the
kubeconfig.
Copy link
Contributor

@yanhua121 yanhua121 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The changes look good to me.

@thunderboltsid thunderboltsid merged commit f731315 into main Jan 16, 2025
8 of 11 checks passed
@thunderboltsid thunderboltsid deleted the jira/NCN-105235 branch January 16, 2025 17:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants