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

Added kubelet config source from apiserver. #3385

Merged
merged 1 commit into from
Jan 12, 2015

Conversation

erictune
Copy link
Member

No description provided.

@erictune
Copy link
Member Author

part of #2483

@erictune
Copy link
Member Author

@pmorie

@erictune
Copy link
Member Author

@thockin you were working with sources too.

@erictune
Copy link
Member Author

@saad-ali you were working in kubelet sources. This is adding one. PTAL to see if I need to pickup your changes in #3355 in my added file.

@saad-ali
Copy link
Member

Thanks for the heads up @erictune. I'll sync up with you tomorrow.

@erictune
Copy link
Member Author

I added a test to ensure that when List returns an empty list, an update is still sent to kubelet. @saad-ali said this is what is necessary to handle bug from #3355.

"github.com/golang/glog"
)

type podLW interface {
Copy link
Member

Choose a reason for hiding this comment

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

Is this interface needed? Can you just use cache.ListerWatcher?

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.

@erictune
Copy link
Member Author

This is ready for oncall to assign a reviewer.

send := func(objs []interface{}) {
var bpods []api.BoundPod
for _, o := range objs {
pod := o.(*api.Pod)
Copy link
Member

Choose a reason for hiding this comment

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

I think you need to use the bound pod factory from pkg/registry/pod...

Copy link
Member Author

Choose a reason for hiding this comment

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

BoundPodFactory can't be easily reused. And I plan to delete it once this series of changes finishes.

I reviewed what MakeBoundPod does:

  • api.Scheme.Convert -- doing that already
  • set env vars -- I intend this to be done in a different part of kubelet in a different PR
  • sets selflink -- Need to add this.

Copy link
Member Author

Choose a reason for hiding this comment

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

added self link

@lavalamp
Copy link
Member

If calling the bound pod factory proves difficult, you may need to simultaneously with this change wire real pods through the kubelet...

@lavalamp lavalamp self-assigned this Jan 12, 2015
@lavalamp
Copy link
Member

LGTM, but travis is broken

@erictune
Copy link
Member Author

PTAL

@lavalamp
Copy link
Member

LGTM

lavalamp added a commit that referenced this pull request Jan 12, 2015
Added kubelet config source from apiserver.
@lavalamp lavalamp merged commit 5565356 into kubernetes:master Jan 12, 2015
@erictune erictune deleted the source_api branch January 12, 2015 23:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants