-
Notifications
You must be signed in to change notification settings - Fork 40.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
validate that daemonsets don't have empty selectors on creation
- Loading branch information
1 parent
ab20b88
commit 2eb4896
Showing
2 changed files
with
10 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2eb4896
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.
TeamCity OSS :: Kubernetes Mesos :: 4 - Smoke Tests Build 20063 outcome was SUCCESS
Summary: Tests passed: 1, ignored: 267 Build time: 00:05:31
2eb4896
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.
@mikedanese
Hey Mike,
I was investigating why my DaemonSet creation started failing with
empty selector is not valid for daemonset
after upgrade to 1.2.2 and found this commit. I think that both the docs and the code mention thatselector
defaults to labels on the pod template so it sounds like it should be okay if it's empty (e.g. https://github.com/kubernetes/kubernetes/blob/v1.2.2/pkg/apis/extensions/types.go#L410). Am I missing something here?Thanks!
2eb4896
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.
@r0mant defaulting happens before validation, so providing only pod labels should be okay. Were your daemonsets created in v1.1? We made a backwards incompatible change (the daemonsets were an alpha feature) that requires the daemonsets to be deleted and recreated when upgrading to 1.2. This is documented in the release notes.
https://github.com/kubernetes/kubernetes/blob/master/CHANGELOG.md/#action-required-1
2eb4896
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.
Okay, I see. Thanks @mikedanese!