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

Task 0: Added node taints labels and feature flags #49547

Merged
merged 2 commits into from
Aug 4, 2017
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions plugin/pkg/scheduler/algorithm/well_known_labels.go
Original file line number Diff line number Diff line change
@@ -28,6 +28,26 @@ const (
// and removed when node becomes reachable (NodeReady status ConditionTrue).
TaintNodeUnreachable = "node.alpha.kubernetes.io/unreachable"

// When feature-gate for TaintBasedEvictions=true flag is enabled,
// TaintNodeOutOfDisk would be automatically added by node controller
// when node becomes out of disk, and removed when node has enough disk.
TaintNodeOutOfDisk = "node.alpha.kubernetes.io/outOfDisk"
Copy link
Member

Choose a reason for hiding this comment

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

What is the rationale behind including alpha in the taint name? Is there concern a taint named node.kubernetes.io/outOfDisk would want to be used in some other way in the future? If not, I'd prefer taking the approach recommended for API fields:

  1. Carefully choose names
  2. Feature gate the setting of the data while in alpha
  3. On graduation to beta, the feature gate can be enabled by default

That means that if the feature survives, clusters that enabled and used the taints in alpha state can simply continue to do so.

cc @kubernetes/sig-api-machinery-pr-reviews

Copy link
Member Author

Choose a reason for hiding this comment

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

Seems node.kubernetes.io/outOfDisk is better to keep the backward compatibility. @gmarek , WDYT?

Copy link
Contributor

Choose a reason for hiding this comment

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

+1 for node.kubernetes.io/outOfDisk

Copy link
Contributor

Choose a reason for hiding this comment

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

+1

Copy link
Member Author

Choose a reason for hiding this comment

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

Great! Updated to node.kubernetes.io/xxxx. Will handle notReady and unreachable in beta graduation PR.


// When feature-gate for TaintBasedEvictions=true flag is enabled,
// TaintNodeMemoryPressure would be automatically added by node controller
// when node has memory pressure, and removed when node has enough memory.
TaintNodeMemoryPressure = "node.alpha.kubernetes.io/memoryPressure"

// When feature-gate for TaintBasedEvictions=true flag is enabled,
// TaintNodeDiskPressure would be automatically added by node controller
// when node has disk pressure, and removed when node has enough disk.
TaintNodeDiskPressure = "node.alpha.kubernetes.io/diskPressure"

// When feature-gate for TaintBasedEvictions=true flag is enabled,
// TaintNodeNetworkUnavailable would be automatically added by node controller
// when node's network is unavailable, and removed when network becomes ready.
TaintNodeNetworkUnavailable = "node.alpha.kubernetes.io/networkUnavailable"

// When kubelet is started with the "external" cloud provider, then
// it sets this taint on a node to mark it as unusable, until a controller
// from the cloud-controller-manager intitializes this node, and then removes