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

kubelet: Refactor prober. #7009

Merged
merged 1 commit into from Apr 20, 2015

Conversation

Projects
None yet
3 participants
@yifan-gu
Copy link
Member

yifan-gu commented Apr 17, 2015

Decompose the health check prober from the kubelet.

@yujuhong @dchen1107 @vmarmol

Yifan Gu
kubelet: Refactor prober.
Decompose the health check prober from the kubelet.

// NewProber creates a Prober, it takes a command runner and
// several container info managers.
func NewProber(

This comment has been minimized.

Copy link
@yujuhong

yujuhong Apr 17, 2015

Member

Do we expect the function to be called outside of this package? Why capitalized the name?

This comment has been minimized.

Copy link
@yifan-gu

yifan-gu Apr 18, 2015

Author Member

@yujuhong Yes, I am expecting to move it to kubelet/prober, otherwise container runtime cannot import it.

This comment has been minimized.

Copy link
@yifan-gu

yifan-gu Apr 18, 2015

Author Member

Or move it to kubelet/container...

Actually this function does feel to belong to kubelet in some sense... Hopefully if kubelet someday does not import dockertools or rkt directly, we can move them back...

This comment has been minimized.

Copy link
@yifan-gu

yifan-gu Apr 18, 2015

Author Member

Another way to work around this is to define an interface in kubelet/container:

type prober interface {
    Probe()
}

And then we can pass the kubelet as this interface to the runtime without the circular import problem.

But I feel it's cleaner to just move it to kubelet/prober. What's your opinion?

@yujuhong

This comment has been minimized.

Copy link
Member

yujuhong commented Apr 20, 2015

I am fine with it being in kubelet/prober :)

yujuhong added a commit that referenced this pull request Apr 20, 2015

Merge pull request #7009 from yifan-gu/kube_dep
kubelet: Refactor prober.

@yujuhong yujuhong merged commit cd61aa9 into kubernetes:master Apr 20, 2015

4 checks passed

Shippable Shippable builds completed
Details
cla/google All necessary CLAs are signed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
coverage/coveralls Coverage increased (+0.05%) to 53.66%
Details

@yifan-gu yifan-gu deleted the yifan-gu:kube_dep branch May 7, 2015

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.