Production-Grade Container Scheduling and Management
Go to file
Kubernetes Submit Queue 61d45f5900 Merge pull request #40541 from fabianofranz/fix_sorting_printer_with_missing_fields
Automatic merge from submit-queue (batch tested with PRs 40645, 40541, 40769)

Fix sorting printer when sorting by a missing field

**What this PR does / why we need it**:

When calling `kubectl get` with the `--sort-by` flag, the command will error out if the field used for sorting is not present in at least one of the objects returned in the list, *even if it is a field valid in the object's model*. 

For example, taking a list of `ReplicationController` where one of them has `status: { replicas: 0 }` (so nothing in `status.availableReplicas`, even that being a valid object in the model and present in every other object of the list) :

```
$ oc get rc --sort-by=status.availableReplicas
error: availableReplicas is not found
```

This PR now traverses the entire list of objects to be sorted and, if at least one has the field provided in `--sort-by`, we sort correctly and consider the field empty in every other object where the field is not present. If none of the objects has the field, we error out (that will catch really invalid fields, and valid ones but not present in any object in the list, which is acceptable). No swagger validation here.

**Release note**:
```release-note
Fixed an issue where 'kubectl get --sort-by=' would return an error when the specified field were not present in at least one of the returned objects, even that being a valid field in the object model.
```
2017-01-31 22:00:38 -08:00
.github Fix issue template to read more clearly 2017-01-27 10:15:06 -07:00
api checking-in generated code 2017-01-25 22:05:21 +01:00
build add myself to build and test approvers 2017-01-31 11:13:09 -08:00
cluster Merge pull request #40274 from muteor/fix-libvirt-coreos-bin-permissions 2017-01-31 19:18:42 -08:00
cmd Merge pull request #40710 from deads2k/client-21-record 2017-01-31 20:40:45 -08:00
docs checking-in generated code 2017-01-25 22:05:21 +01:00
examples move pkg/storage to apiserver 2017-01-31 19:07:33 -05:00
federation Merge pull request #40710 from deads2k/client-21-record 2017-01-31 20:40:45 -08:00
Godeps Update generated files 2017-01-29 21:41:45 +01:00
hack move pkg/storage to apiserver 2017-01-31 19:07:33 -05:00
hooks Fix spelling in package naming linter error message 2016-12-20 15:48:14 -05:00
logo Updated top level owners file to match new format 2017-01-19 11:29:16 -08:00
pkg Merge pull request #40541 from fabianofranz/fix_sorting_printer_with_missing_fields 2017-01-31 22:00:38 -08:00
plugin move client/record 2017-01-31 19:14:13 -05:00
staging Merge pull request #40710 from deads2k/client-21-record 2017-01-31 20:40:45 -08:00
test move client/record 2017-01-31 19:14:13 -05:00
third_party Update generated files 2017-01-25 19:49:45 +01:00
translations Merge pull request #40645 from brendandburns/fr 2017-01-31 21:27:52 -08:00
vendor Merge pull request #40710 from deads2k/client-21-record 2017-01-31 20:40:45 -08:00
.bazelrc bazel: save git version in kubernetes.tar.gz 2017-01-23 17:28:08 -08:00
.gazelcfg.json Generate a dummy BUILD file in _output/local/go to keep Bazel out of trouble 2017-01-05 22:05:17 -08:00
.generated_docs Revert "Add the ability to edit fields within a config map." 2017-01-25 09:12:32 -05:00
.generated_files List generated files for the github size munger 2016-11-15 15:47:22 -08:00
.gitattributes Add -diff attributes for generated files 2016-12-08 17:12:07 -08:00
.gitignore
BUILD.bazel bazel: save git version in kubernetes.tar.gz 2017-01-23 17:28:08 -08:00
CHANGELOG.md Update 1.6.0-alpha.1 changelog 2017-01-31 12:02:24 -05:00
code-of-conduct.md
CONTRIBUTING.md updated munge-docs 2016-11-29 01:35:11 -08:00
labels.yaml
LICENSE LICENSE: revert modifications to Apache license 2016-11-22 11:44:46 -08:00
Makefile Default EMBED_LICENSE_TARGETS=true for make bazel-release 2017-01-26 12:20:06 -08:00
Makefile.generated_files Remove a from each codegen path 2016-12-30 18:44:32 -08:00
OWNERS Add wojtec to global approvers 2017-01-25 11:57:00 -06:00
OWNERS_ALIASES OWNERS: Create sig-node alias 2017-01-17 16:25:40 -08:00
README.md Update README.md 2016-12-20 08:51:06 -06:00
Vagrantfile
WORKSPACE Switch io_kubernetes_build to repo-infra. 2017-01-26 15:57:16 -08:00

Kubernetes

Submit Queue Widget GoDoc Widget Coverage Status Widget

Introduction

Kubernetes is an open source system for managing containerized applications across multiple hosts, providing basic mechanisms for deployment, maintenance, and scaling of applications. Kubernetes is hosted by the Cloud Native Computing Foundation (CNCF)

Kubernetes builds upon a decade and a half of experience at Google running production workloads at scale using a system called Borg, combined with best-of-breed ideas and practices from the community.


Are you ...

Code of Conduct

The Kubernetes community abides by the CNCF code of conduct. Here is an excerpt:

As contributors and maintainers of this project, and in the interest of fostering an open and welcoming community, we pledge to respect all people who contribute through reporting issues, posting feature requests, updating documentation, submitting pull requests or patches, and other activities.

Community

Do you want to help "shape the evolution of technologies that are container-packaged, dynamically-scheduled and microservices-oriented? ". If you are a company, you should consider joining the CNCF. For details about who's involved in CNCF and how Kubernetes plays a role, read the announcement. For general information about our community see the website community page.

Join us on social media (Twitter, Google+) and read our blog

Ask questions and help answer them on Slack or Stack Overflow

Attend our key events (kubecon, cloudnativecon, weekly community meeting)

Join a Special Interest Group (SIG)

Contribute

If you're interested in being a contributor and want to get involved in developing Kubernetes, get started with this reading:

You will then most certainly gain a lot from joining a SIG, attending the regular hangouts as well as the community meeting.

If you have an idea for a new feature, see the Kubernetes Features repository for a list of features that are coming in new releases as well as details on how to propose one.

Building Kubernetes for the impatient

If you want to build Kubernetes right away there are two options:

$ go get -d k8s.io/kubernetes
$ cd $GOPATH/src/k8s.io/kubernetes
$ make
$ git clone https://github.com/kubernetes/kubernetes
$ cd kubernetes
$ make quick-release

If you are less impatient, head over to the developer's documentation.

Support

While there are many different channels that you can use to get hold of us (Slack, Stack Overflow, Issues, Forums/Mailing lists), you can help make sure that we are efficient in getting you the help that you need.

If you need support, start with the troubleshooting guide and work your way through the process that we've outlined.

That said, if you have questions, reach out to us one way or another. We don't bite!

Analytics