forked from kubernetes/kubernetes
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
UPSTREAM: 31163: add resource filter handling
UPSTREAM: kubernetes#31163 Fixes openshift/origin#9901 Resources are currently filtered (in order to prevent printing) at print time in their HumanReadablePrinter handlers. This design makes it not possible to filter objects when they are printed using any other printer, such as YAML, JSON, or the NamePrinter. This patch removes any filters previously added at the printer level for pods and adds a way to define resource-specific filters before they are sent to a printer handler. A woking filter handler for pods has also been implemented. Filters affect resources being printed through the HumanReadablePrinter, YAML, JSON, and `--template` printers. :100644 100644 cf7d1af... 185d31b... M pkg/kubectl/cmd/cmd_test.go :100644 100644 6551226... 99d7838... M pkg/kubectl/cmd/get.go :100644 100644 49ffb4d... 72d6c0f... M pkg/kubectl/cmd/util/factory.go :100644 100644 adc82b6... e42e819... M pkg/kubectl/cmd/util/helpers.go :100644 100644 892b30e... 78f11e4... M pkg/kubectl/resource/result.go :000000 100644 0000000... 8ca31d8... A pkg/kubectl/resource_filter.go :100644 100644 5af291e... 0b07610... M pkg/kubectl/resource_printer.go :100644 100644 2f341ac... cc04248... M pkg/kubectl/resource_printer_test.go
- Loading branch information
1 parent
0bfacd3
commit 7eb0b9d
Showing
8 changed files
with
244 additions
and
83 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
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
Oops, something went wrong.