-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Change all Start() to Start([]namespaces) to consume updated namespaces where resources get deployed. #5487
Conversation
Codecov Report
@@ Coverage Diff @@
## master #5487 +/- ##
==========================================
- Coverage 71.46% 71.26% -0.20%
==========================================
Files 397 400 +3
Lines 14577 14971 +394
==========================================
+ Hits 10417 10669 +252
- Misses 3389 3513 +124
- Partials 771 789 +18
Continue to review full report at Codecov.
|
LGTM. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I prefer option 2 and enhance PodWatcher.Start(namespaces)
. It would mean that when namespaces change (e.g., on a redeploy), we'd just .Stop()
and then .Start(newNamespaces)
.
Testing notes
VS On released skaffold version ,
|
pkg/skaffold/runner/build_deploy.go
Outdated
logrus.Warnln("Error starting port forwarding:", err) | ||
} | ||
|
||
// Start printing the logs after deploy is finished | ||
if err := logger.Start(ctx); err != nil { | ||
if err := logger.Start(ctx, r.runCtx.Namespaces); err != nil { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
GetNamespaces()
(we should un-export these fields… someday)
the CI failure is due to "Docker too many request" |
Fixes #5480
Change all below Objects
Problem:
namespace
if it is different than--namespace
skaffold command line flag.Reason:
Skaffold is unaware of namespaces in the k8 manifests until after we deploy. During deploy, we read manifests, and collect all namespaces.
In #2640, we updated
Deploy
to return a list of namespaces so all watchers, deployment fetcher can query namespaces where resources get deployed and update therunner.runCtx.Namespaces
. This was used indeploy.StatusCheck
however not in Logger, containerManager etc.Associated bug #2495
In this approach, we are passing the namespace after
deploy.Deploy
to allStart
methods to watch pods, containers in deployed namespaces.logger.Start
andcontainer_manager.Start
and use updated namespace inrunner.runCtx.Namespaces
.Pros:
namespaces
from constructors for all above objects.Alternate method
Pros:
Cons: