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

Disabled ScheduleDaemonSetPods if kubelet version less than 1.11. #69566

Merged
merged 1 commit into from
Oct 23, 2018

Conversation

k82cn
Copy link
Member

@k82cn k82cn commented Oct 9, 2018

Signed-off-by: Da K. Ma klaus1982.cn@gmail.com

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

Release note:

Disabled ScheduleDaemonSetPods if kubelet version less than 1.11; and ScheduleDaemonSetPods is not supported on a 1.13 control plane / 1.10 kubelet split.

@k8s-ci-robot k8s-ci-robot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. do-not-merge/cherry-pick-not-approved Indicates that a PR is not yet approved to merge into a release branch. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-kind Indicates a PR lacks a `kind/foo` label and requires one. needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels Oct 9, 2018
@k8s-ci-robot k8s-ci-robot added sig/apps Categorizes an issue or PR as relevant to SIG Apps. and removed needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels Oct 9, 2018
@k82cn k82cn added this to the v1.12 milestone Oct 9, 2018
@k82cn
Copy link
Member Author

k82cn commented Oct 9, 2018

/kind bug

@k8s-ci-robot k8s-ci-robot added kind/bug Categorizes issue or PR as related to a bug. and removed needs-kind Indicates a PR lacks a `kind/foo` label and requires one. labels Oct 9, 2018
Copy link
Member

@bsalamat bsalamat left a comment

Choose a reason for hiding this comment

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

Thanks, Klaus. It looks correct to me, but please add tests. Also, add a comment describing what the new piece of code does and mention the version of K8s at which we should remove this piece of code.

@liggitt
Copy link
Member

liggitt commented Oct 9, 2018

if this isn't included in 1.13, we'll need a prominent release note that daemonsets will not be supported on a 1.13 control plane / 1.10 kubelet split

@k82cn
Copy link
Member Author

k82cn commented Oct 10, 2018

Also, add a comment describing what the new piece of code does and mention the version of K8s at which we should remove this piece of code.

I created this PR against 1.12; so we do not need to remove it in 1.13 :)

will not be supported on a 1.13 control plane / 1.10 kubelet split

Is that our version policy, only +2 version support?

The unit test (TestSimpleDaemonSetScheduleDaemonSetPodsLaunchesPods) failed because dsc.nodeList.Get() does not work in unit test :(. Not sure how to fix right now; keep working on that.

That's because we set node's namespace to default :(, also open a PR in master to fix that.

@k82cn k82cn changed the title WIP: Disabled ScheduleDaemonSetPods if kubelet version less than 1.11. Disabled ScheduleDaemonSetPods if kubelet version less than 1.11. Oct 10, 2018
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Oct 10, 2018
@k8s-ci-robot k8s-ci-robot added the sig/testing Categorizes an issue or PR as relevant to SIG Testing. label Oct 10, 2018
@bsalamat
Copy link
Member

I created this PR against 1.12; so we do not need to remove it in 1.13 :)

I see.

Is that our version policy, only +2 version support?

Yes, but I think we should still put it in the release notes since we know that kubelet 1.10 is not going to work with 1.13 control plane. Sometimes an unsupported feature may work fine, but in this case we know that it won't work.

@k82cn
Copy link
Member Author

k82cn commented Oct 11, 2018

Sometimes an unsupported feature may work fine, but in this case we know that it won't work.

Sure, that's OK to me :)

@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Oct 12, 2018
NodeInfo: v1.NodeSystemInfo{
// minimum version required to use matchFields
KubeletVersion: "v1.11.0",
},
},
}
}

func addNodes(nodeStore cache.Store, startIndex, numNodes int, label map[string]string) {
Copy link
Member

Choose a reason for hiding this comment

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

rather than making these a mixture of old and new nodes (which requires modifying existing tests), I'd recommend:

  1. allow control of the node version being added
  2. make addNodes/newNode default to adding a 1.11+ node, which should allow all existing tests to stay as-is
  3. add a new test that adds some new and some old nodes, and specifically check that pods for the new nodes use MatchFields and pods for the old nodes use nodeName

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

@liggitt
Copy link
Member

liggitt commented Oct 15, 2018

lgtm, will defer to @bsalamat for taggging

Copy link
Member

@bsalamat bsalamat left a comment

Choose a reason for hiding this comment

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

Looks good. Just a couple of minor comments.


// When ScheduleDaemonSetPods is enabled, DaemonSets without node selectors should
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 a copy/paste of another test's comment?

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

}()
setFeatureGate(t, features.ScheduleDaemonSetPods, true)

nodeNum := 5
Copy link
Member

Choose a reason for hiding this comment

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

s/nodeNum/numNodes/

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

Signed-off-by: Da K. Ma <klaus1982.cn@gmail.com>
@feiskyer
Copy link
Member

@bsalamat @liggitt Could you get the PR approved (with both lgtm and approved label) by end of Tuesday, Oct 23th? Or else, it will miss v1.12.2.

@liggitt
Copy link
Member

liggitt commented Oct 22, 2018

/lgtm

@liggitt
Copy link
Member

liggitt commented Oct 22, 2018

/approve

@bsalamat bsalamat added lgtm "Looks good to me", indicates that a PR is ready to be merged. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Oct 22, 2018
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

Approval requirements bypassed by manually added approval.

This pull-request has been approved by: k82cn, liggitt

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

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@feiskyer feiskyer added cherry-pick-approved Indicates a cherry-pick PR into a release branch has been approved by the release branch manager. and removed do-not-merge/cherry-pick-not-approved Indicates that a PR is not yet approved to merge into a release branch. labels Oct 23, 2018
@feiskyer
Copy link
Member

/retest

@k8s-ci-robot k8s-ci-robot merged commit b17431a into kubernetes:release-1.12 Oct 23, 2018
@k82cn k82cn deleted the k8s_69346 branch October 23, 2018 13:42
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. cherry-pick-approved Indicates a cherry-pick PR into a release branch has been approved by the release branch manager. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/bug Categorizes issue or PR as related to a bug. lgtm "Looks good to me", indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes. sig/apps Categorizes an issue or PR as relevant to SIG Apps. sig/testing Categorizes an issue or PR as relevant to SIG Testing. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants