-
Notifications
You must be signed in to change notification settings - Fork 38.6k
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
Stabilize map order in kubectl describe #26046
Merged
k8s-github-robot
merged 1 commit into
kubernetes:master
from
timoreimann:stabilize-map-order-in-kubectl-describe
May 28, 2016
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
/* | ||
Copyright 2016 The Kubernetes Authors All rights reserved. | ||
|
||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
|
||
http://www.apache.org/licenses/LICENSE-2.0 | ||
|
||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
*/ | ||
|
||
package kubectl | ||
|
||
import ( | ||
"reflect" | ||
"sort" | ||
"testing" | ||
|
||
"k8s.io/kubernetes/pkg/api" | ||
) | ||
|
||
func TestSortableResourceNamesSorting(t *testing.T) { | ||
want := SortableResourceNames{ | ||
api.ResourceName(""), | ||
api.ResourceName("42"), | ||
api.ResourceName("bar"), | ||
api.ResourceName("foo"), | ||
api.ResourceName("foo"), | ||
api.ResourceName("foobar"), | ||
} | ||
|
||
in := SortableResourceNames{ | ||
api.ResourceName("foo"), | ||
api.ResourceName("42"), | ||
api.ResourceName("foobar"), | ||
api.ResourceName("foo"), | ||
api.ResourceName("bar"), | ||
api.ResourceName(""), | ||
} | ||
|
||
sort.Sort(in) | ||
if !reflect.DeepEqual(in, want) { | ||
t.Errorf("got %v, want %v", in, want) | ||
} | ||
} |
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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
I think we should stop reporting qos per resource in 1.3
@bgrant0607 @vishh - now that we have merged #14943 should we update the CLI to just output the QoS of the pod?
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.
Yes. We should do that. I can post a patch for it later today, unless we
want to make that change in this PR itself.
On Wed, May 25, 2016 at 2:43 PM, Derek Carr notifications@github.com
wrote:
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.
Does this mean that if I have a deployment and describe it I won't be able to see its QoS anymore?
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.
I could be wrong here, but my understanding is that QoS just moves one layer up from containers to pods.
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.
Qos has changed this release to be at the pod level and not for individual
compute resources. A follow on PR was made that now reports the effective
QoS for a pod in describe.
On Thursday, May 26, 2016, Michail Kargakis notifications@github.com
wrote: