-
Notifications
You must be signed in to change notification settings - Fork 40k
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
Conversation
/kind bug |
There was a problem hiding this 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.
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 |
I created this PR against 1.12; so we do not need to remove it in 1.13 :)
Is that our version policy, only +2 version support?
That's because we set node's namespace to default :(, also open a PR in master to fix that. |
I see.
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. |
Sure, that's OK to me :) |
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) { |
There was a problem hiding this comment.
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:
- allow control of the node version being added
- make addNodes/newNode default to adding a 1.11+ node, which should allow all existing tests to stay as-is
- 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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
lgtm, will defer to @bsalamat for taggging |
There was a problem hiding this 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 |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/nodeNum/numNodes/
There was a problem hiding this comment.
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>
/lgtm |
/approve |
[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 |
/retest |
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: