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

Add Host to PodSpec and add a predicate to make the scheduler work. #3043

Merged
merged 1 commit into from Dec 19, 2014

Conversation

brendandburns
Copy link
Contributor

No description provided.

@brendandburns
Copy link
Contributor Author

Tests fixed.

@bgrant0607
Copy link
Member

Context for others: #3020, #1518.

@smarterclayton @lavalamp @markturansky After asking for Host to be moved to Status, I've proposed putting it in Spec, to facilitate "scheduling" by users and controllers, the per-node controller in particular in this case. Internally, we use constraints for that, but that approach has a number of problems. Making it explicit is clearer for users and enables a fast path in the system (for now, in the scheduler).

@@ -162,6 +162,13 @@ func (n *NodeSelector) PodSelectorMatches(pod api.Pod, existingPods []api.Pod, n
return selector.Matches(labels.Set(minion.Labels)), nil
}

func PodFitsHost(pod api.Pod, existingPods []api.Pod, node string) (bool, error) {
Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done.

Copy link
Contributor

Choose a reason for hiding this comment

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

@bgrant0607 would this be a good way to format newly attached GCEPDs/EBS volumes? In #2609 I suggested having kubelet format a newly attached disk before mounting the filesystem. I can see a per-node controller performing this action instead. It could effectively throttle the number of concurrent formatting operations and prevent the host from getting crushed.

Your feedback and advice on #2609 would be invaluable :)

Setting the host in Spec would also easily accommodate the hostDir example laid out in #1515.

Copy link
Member

Choose a reason for hiding this comment

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

@markturansky I'll take a look at the other PRs.

@bgrant0607 bgrant0607 self-assigned this Dec 19, 2014
@bgrant0607
Copy link
Member

push changes?

@bgrant0607
Copy link
Member

LGTM

@bgrant0607 bgrant0607 added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Dec 19, 2014
@brendandburns
Copy link
Contributor Author

I can haz mergez?

bgrant0607 added a commit that referenced this pull request Dec 19, 2014
Add Host to PodSpec and add a predicate to make the scheduler work.
@bgrant0607 bgrant0607 merged commit 486e929 into kubernetes:master Dec 19, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm "Looks good to me", indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants