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

Conversation

k82cn
Copy link
Member

@k82cn k82cn commented Jul 25, 2017

What this PR does / why we need it:
Added node taint const for node condition.

Which issue this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close that issue when PR gets merged): part of #42001

Release note:

None

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Jul 25, 2017
@k82cn
Copy link
Member Author

k82cn commented Jul 25, 2017

/cc @liggitt

@k8s-github-robot k8s-github-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. release-note-none Denotes a PR that doesn't merit a release note. labels Jul 25, 2017
@k8s-ci-robot k8s-ci-robot requested a review from liggitt July 25, 2017 07:26
@k82cn
Copy link
Member Author

k82cn commented Jul 25, 2017

/retest

// 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.

@k82cn
Copy link
Member Author

k82cn commented Jul 25, 2017

/cc @gmarek

@k8s-ci-robot k8s-ci-robot requested a review from gmarek July 25, 2017 13:22
@k82cn
Copy link
Member Author

k82cn commented Jul 25, 2017

/cc @kubernetes/sig-scheduling-api-reviews

@k8s-ci-robot k8s-ci-robot added sig/scheduling Categorizes an issue or PR as relevant to SIG Scheduling. kind/api-change Categorizes issue or PR as related to adding, removing, or otherwise changing an API labels Jul 25, 2017
@k8s-github-robot k8s-github-robot removed the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 27, 2017
@k82cn k82cn changed the title Task 0: Added node taints labels. Task 0: Added node taints labels and feature flags Jul 27, 2017
@k82cn
Copy link
Member Author

k82cn commented Jul 31, 2017

/unassign @jayunit100 @timothysc
/assign @gmarek

@k8s-ci-robot k8s-ci-robot assigned gmarek and unassigned timothysc and jayunit100 Jul 31, 2017
@k82cn
Copy link
Member Author

k82cn commented Jul 31, 2017

/retest

// 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.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.

these should all have .alpha.

Copy link
Member

Choose a reason for hiding this comment

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

see the discussion on including alpha in the name in kubernetes/community#819 (comment)

tl;dr: if you include alpha in the name, there is no reasonable way to migrate people to the beta and ga versions. feature-gating the alpha function is sufficient to keep it from affecting anything until it graduates to beta or an admin opts in to using it in alpha mode.

Copy link
Member Author

Choose a reason for hiding this comment

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

Copy link
Member Author

Choose a reason for hiding this comment

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

@timothysc , is that OK for your?

Copy link
Member

Choose a reason for hiding this comment

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

We should update other taints then, and have a pattern for upgrade.
/cc @davidopp

Copy link
Member Author

Choose a reason for hiding this comment

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

I'd like to update other taint when graduating from alpha to beta in separate PR.

Copy link
Member

Choose a reason for hiding this comment

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

these look OK to me, per @LiGgit's comment

@k82cn
Copy link
Member Author

k82cn commented Aug 2, 2017

if not comments on the name of label, can we get this PR merged firstly?

//
// Taint nodes based on their condition status for 'NetworkUnavailable',
// 'MemoryPressure', 'OutOfDisk' and 'DiskPressure'.
TaintNodesByCondition utilfeature.Feature = "TaintNodesByCondition"
Copy link
Member

Choose a reason for hiding this comment

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

Don't feature gates need to be plumbed through api-machinery to hit all component configs?

Copy link
Member Author

Choose a reason for hiding this comment

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

Nop; AFAIK, feature gates are local map in each component for now :).

// 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.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.

We should update other taints then, and have a pattern for upgrade.
/cc @davidopp

@k82cn
Copy link
Member Author

k82cn commented Aug 3, 2017

@timothysc @liggitt @gmarek , can we get this merged?

@liggitt
Copy link
Member

liggitt commented Aug 4, 2017

@timothysc @liggitt @gmarek , can we get this merged?

My main interest was the taint name and plans for progressing to beta and stable, so no objections from me

@k82cn
Copy link
Member Author

k82cn commented Aug 4, 2017

@davidopp , do you have any comments for the name of taint labels? If not, I think we can merge this :).

@gmarek
Copy link
Contributor

gmarek commented Aug 4, 2017

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Aug 4, 2017
@wojtek-t
Copy link
Member

wojtek-t commented Aug 4, 2017

/approve

@k8s-github-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: gmarek, k82cn, wojtek-t

Associated issue: 42001

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these OWNERS Files:

You can indicate your approval by writing /approve in a comment
You can cancel your approval by writing /approve cancel in a comment

@k8s-github-robot k8s-github-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Aug 4, 2017
@fejta-bot
Copy link

/retest
This bot automatically retries jobs that failed/flaked on approved PRs (send feedback to @fejta).

Review the full test history for this PR.

@timothysc timothysc added this to the v1.8 milestone Aug 4, 2017
@k82cn
Copy link
Member Author

k82cn commented Aug 4, 2017

/retest

@k8s-github-robot
Copy link

Automatic merge from submit-queue (batch tested with PRs 50119, 48366, 47181, 41611, 49547)

@k8s-github-robot k8s-github-robot merged commit 90a45b2 into kubernetes:master Aug 4, 2017
@k82cn k82cn deleted the k8s_42001_0 branch May 16, 2022 06:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/api-change Categorizes issue or PR as related to adding, removing, or otherwise changing an API lgtm "Looks good to me", indicates that a PR is ready to be merged. release-note-none Denotes a PR that doesn't merit a release note. sig/scheduling Categorizes an issue or PR as relevant to SIG Scheduling. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.