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 service account to profile conversion #1012

Merged
merged 1 commit into from Feb 5, 2019

Conversation

Projects
None yet
2 participants
@song-jiang
Copy link
Member

song-jiang commented Feb 5, 2019

Description

Service account kube-controller compares service account (stored as profile) object from cache with object from etcd datastore. If these two objects are different, kube-controller will update etcd datastore. Current conversion from k8s service account to a profile resource use an empty map if there is no labelToApply. However, etcd would store empty map to nil. Hence object from cache (empty map) is regarded as different with object read from etcd (nil map). kube-controller will keep updating etcd datastore which is not necessary.

Namespace object does not have this issue since its' conversion set label to nil if there is no labelToApply.

Todos

  • Tests
  • Documentation
  • Release note

Release Note

Fix kube-controllers performing unnecessary reprogramming of profiles

@song-jiang song-jiang requested a review from caseydavenport Feb 5, 2019

@song-jiang song-jiang merged commit 93329ff into projectcalico:master Feb 5, 2019

2 checks passed

license/cla Contributor License Agreement is signed.
Details
semaphoreci The build passed on Semaphore.
Details

@song-jiang song-jiang deleted the song-jiang:song-profile branch Feb 5, 2019

@caseydavenport caseydavenport added this to the Calico v3.6.0 milestone Feb 25, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.