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

Migrate kubelet to ConfigMapManager interface and use TTL-based caching manager #46470

Merged
merged 2 commits into from
Jun 1, 2017

Conversation

shyamjvs
Copy link
Member

@shyamjvs shyamjvs commented May 25, 2017

Fixes #41379
Sometime ago we moved to a secret manager interface for kubelet to manage secrets.
This PR's first commit moves config map management also to a similar interface.
The second commit adds TTL-based CachingConfigMapManager (similar to CachingSecretManager) and makes kubelet use it.

/cc @kubernetes/sig-node-pr-reviews @kubernetes/sig-scalability-misc @wojtek-t @dchen1107

@k8s-ci-robot k8s-ci-robot added sig/node Categorizes an issue or PR as relevant to SIG Node. sig/scalability Categorizes an issue or PR as relevant to SIG Scalability. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels May 25, 2017
@k8s-github-robot k8s-github-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. release-note-label-needed labels May 25, 2017
@shyamjvs shyamjvs added area/kubelet kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. release-note-none Denotes a PR that doesn't merit a release note. and removed release-note-label-needed labels May 25, 2017
@xiangpengzhao
Copy link
Contributor

@shyamjvs please fix the test flake. It's due to your modification of NewBasicPodManager

I0525 22:15:52.975] k8s.io/kubernetes/pkg/kubelet/volumemanager/populator/desired_state_of_world_populator_test.go:44: not enough arguments in call to pod.NewBasicPodManager
I0525 22:15:52.976] 	have (*"k8s.io/kubernetes/pkg/kubelet/pod/testing".FakeMirrorClient, secret.Manager)
I0525 22:15:52.977] 	want (pod.MirrorClient, secret.Manager, configmap.Manager)

Copy link
Member

@wojtek-t wojtek-t left a comment

Choose a reason for hiding this comment

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

Just minor nit - also please fix tests.

@@ -163,6 +166,10 @@ func (pm *basicManager) updatePodsInternal(pods ...*v1.Pod) {
// not register pod, as it doesn't really matter.
pm.secretManager.RegisterPod(pod)
}
if pm.configMapManager != nil {
// TODO: Same as above.
Copy link
Member

Choose a reason for hiding this comment

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

Please copy a TODO instead of writing "Same as above"

Copy link
Member Author

Choose a reason for hiding this comment

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

Done.

@wojtek-t
Copy link
Member

LGTM

@dchen1107 @yujuhong - can you of you please take a look?

@shyamjvs
Copy link
Member Author

@k8s-bot pull-kubernetes-unit test this
(seems unrelated)

@k8s-github-robot k8s-github-robot added size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels May 30, 2017
@k8s-github-robot k8s-github-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label May 31, 2017
@wojtek-t
Copy link
Member

@shyamjvs - please rebase

@shyamjvs
Copy link
Member Author

@yujuhong Thanks a lot for taking out time to review.
@wojtek-t Rebased. Thanks.

@k8s-github-robot k8s-github-robot removed lgtm "Looks good to me", indicates that a PR is ready to be merged. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. labels May 31, 2017
@shyamjvs
Copy link
Member Author

@k8s-bot pull-kubernetes-kubemark-e2e-gce test this
Seems some issue on gce side:

W0531 01:56:45.127] ERROR: (gcloud.compute.networks.create) Could not fetch resource:
W0531 01:56:45.128]  - Code: '3768090691729186078'

@shyamjvs
Copy link
Member Author

Applying lgtm based on @wojtek-t 's #46470 (comment) above.

@shyamjvs shyamjvs added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label May 31, 2017
@shyamjvs
Copy link
Member Author

@k8s-bot pull-kubernetes-verify test this

@shyamjvs
Copy link
Member Author

@k8s-bot pull-kubernetes-e2e-gce-etcd3 test this

1 similar comment
@shyamjvs
Copy link
Member Author

@k8s-bot pull-kubernetes-e2e-gce-etcd3 test this

@shyamjvs shyamjvs added this to the v1.7 milestone May 31, 2017
@shyamjvs
Copy link
Member Author

@k8s-bot pull-kubernetes-e2e-gce-etcd3 test this

@shyamjvs
Copy link
Member Author

Added 'retest-not-required' label as it happened for the 3rd time that all PR tests passed when I rerun them, but 'pull-kubernetes-e2e-gce-etcd3' (which has been super-flaky recently) fails during the premerge round, making me repeat the cycle all over again.

@shyamjvs
Copy link
Member Author

@k8s-bot pull-kubernetes-e2e-gce-etcd3 test this

@spiffxp
Copy link
Member

spiffxp commented May 31, 2017

looks like etcd3 job is bumping into #46713

@shyamjvs
Copy link
Member Author

@spiffxp Thanks for the lead. Will wait for the new run's result (after bumping up subnet quota in the project) and then retry.

@shyamjvs
Copy link
Member Author

shyamjvs commented Jun 1, 2017

@k8s-bot pull-kubernetes-e2e-gce-etcd3 test this

1 similar comment
@wojtek-t
Copy link
Member

wojtek-t commented Jun 1, 2017

@k8s-bot pull-kubernetes-e2e-gce-etcd3 test this

@k8s-github-robot
Copy link

Automatic merge from submit-queue

@k8s-github-robot k8s-github-robot merged commit c13d891 into kubernetes:master Jun 1, 2017
@shyamjvs shyamjvs deleted the configmap-interface branch June 1, 2017 08:58
k8s-github-robot pushed a commit that referenced this pull request Jun 1, 2017
Automatic merge from submit-queue

Performance tests also cover configmaps now

Similar to secrets.
We should be able to get this in once #46470 is merged.

/cc @wojtek-t @gmarek
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. area/kubelet cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. lgtm "Looks good to me", indicates that a PR is ready to be merged. release-note-none Denotes a PR that doesn't merit a release note. sig/node Categorizes an issue or PR as relevant to SIG Node. sig/scalability Categorizes an issue or PR as relevant to SIG Scalability. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

10 participants