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

Fetch namespaces at time of sync #6135

Merged
merged 2 commits into from
Jul 7, 2021

Conversation

briandealwis
Copy link
Member

Fixes: #5968

Description
The podSyncer is initialized with the set of namespaces from the configuration, and thus misses any namespace updates from the deployment.

func NewSyncProvider(config Config, cli *kubectl.CLI) Provider {
once.Do(func() {
provider = &fullProvider{
kubernetesSyncer: func(podSelector *kubernetes.ImageList) Syncer {
return &podSyncer{
kubectl: cli,
namespaces: config.GetNamespaces(),
}
},

This patch causes the config to be passed to the podSyncer such that it processes the known namespaces at sync time.

@briandealwis briandealwis requested a review from nkubala July 5, 2021 21:51
@briandealwis briandealwis requested a review from a team as a code owner July 5, 2021 21:51
@google-cla google-cla bot added the cla: yes label Jul 5, 2021
Copy link
Contributor

@gsquared94 gsquared94 left a comment

Choose a reason for hiding this comment

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

lgtm

@briandealwis briandealwis enabled auto-merge (squash) July 6, 2021 13:54
@codecov
Copy link

codecov bot commented Jul 6, 2021

Codecov Report

Merging #6135 (c52e3bc) into master (823896b) will decrease coverage by 0.01%.
The diff coverage is 50.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #6135      +/-   ##
==========================================
- Coverage   69.94%   69.93%   -0.02%     
==========================================
  Files         478      478              
  Lines       18286    18286              
==========================================
- Hits        12791    12789       -2     
- Misses       4548     4549       +1     
- Partials      947      948       +1     
Impacted Files Coverage Δ
pkg/skaffold/sync/sync.go 70.27% <0.00%> (ø)
pkg/skaffold/sync/types.go 0.00% <ø> (ø)
pkg/skaffold/sync/provider.go 71.42% <100.00%> (ø)
pkg/skaffold/util/tar.go 50.66% <0.00%> (-5.34%) ⬇️
pkg/skaffold/docker/parse.go 87.14% <0.00%> (+0.95%) ⬆️

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 823896b...c52e3bc. Read the comment docs.

@briandealwis briandealwis merged commit 1a5fdc7 into GoogleContainerTools:master Jul 7, 2021
@briandealwis briandealwis deleted the i5968 branch July 7, 2021 22:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Sync only monitors pre-configured namespaces
2 participants