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: status check connecting to the wrong k8s context #8981

Conversation

ericzzzzzzz
Copy link
Contributor

@ericzzzzzzz ericzzzzzzz commented Aug 1, 2023

Fixes: #8970

Description

  • The original way to create k8s client for status check seems a typo, not intended.
  • We should use the kubeContext to initiate kubeClient instead of kubeConfig
  • Using kubeConfig causes status check against active context that user host is connected, we should instead do the check against kube context users set up for skaffold.

@ericzzzzzzz ericzzzzzzz changed the title fix: status check connecting to the wrong context fix: status check connecting to the wrong k8s context Aug 1, 2023
@codecov
Copy link

codecov bot commented Aug 1, 2023

Codecov Report

Merging #8981 (4fee549) into main (290280e) will decrease coverage by 6.84%.
Report is 987 commits behind head on main.
The diff coverage is 49.80%.

@@            Coverage Diff             @@
##             main    #8981      +/-   ##
==========================================
- Coverage   70.48%   63.64%   -6.84%     
==========================================
  Files         515      624     +109     
  Lines       23150    31941    +8791     
==========================================
+ Hits        16317    20330    +4013     
- Misses       5776    10081    +4305     
- Partials     1057     1530     +473     
Files Changed Coverage Δ
cmd/skaffold/app/cmd/completion.go 13.04% <0.00%> (-1.25%) ⬇️
cmd/skaffold/app/cmd/config/list.go 65.21% <ø> (ø)
cmd/skaffold/app/cmd/config/set.go 88.72% <ø> (ø)
cmd/skaffold/app/cmd/config/util.go 54.28% <ø> (ø)
cmd/skaffold/app/cmd/credits.go 100.00% <ø> (ø)
cmd/skaffold/app/cmd/credits/export.go 0.00% <0.00%> (ø)
cmd/skaffold/app/cmd/deploy.go 40.90% <0.00%> (-12.94%) ⬇️
cmd/skaffold/app/cmd/generate_pipeline.go 60.00% <ø> (ø)
cmd/skaffold/app/cmd/inspect_modules.go 65.00% <ø> (ø)
cmd/skaffold/app/cmd/inspect_profiles.go 66.66% <ø> (ø)
... and 40 more

... and 415 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@ericzzzzzzz ericzzzzzzz marked this pull request as ready for review August 1, 2023 16:14
@ericzzzzzzz ericzzzzzzz merged commit 2df4ccf into GoogleContainerTools:main Aug 1, 2023
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

kubeContext doesn't work with skaffold run
2 participants