Commit Graph

135 Commits (a3f8ee6578115e4c64f256b6ea01cf0b65b94024)

Author SHA1 Message Date
Clayton Coleman 9a2a50cda7
refactor: use metav1.ObjectMeta in other types 2017-01-17 16:17:19 -05:00
deads2k f1176d9c5c mechanical repercussions 2017-01-13 08:27:14 -05:00
deads2k 6a4d5cd7cc start the apimachinery repo 2017-01-11 09:09:48 -05:00
Kubernetes Submit Queue 9ef9630976 Merge pull request #39486 from ncdc/allow-missing-keys-in-templates
Automatic merge from submit-queue (batch tested with PRs 39486, 37288, 39477, 39455, 39542)

Allow missing keys in templates by default

Switch to allowing missing keys in jsonpath templates by default.

Add support for allowing/disallowing missing keys in go templates
(default=allow).

Add --allow-missing-template-keys flag to control this behavior (default=true /
allow missing keys).

Fixes #37991

@kubernetes/sig-cli-misc @kubernetes/api-reviewers @smarterclayton @fabianofranz @liggitt @pwittrock
2017-01-10 14:33:10 -08:00
Andy Goldstein 80c5cd8b88 Allow missing keys in templates by default
Switch to allowing missing keys in jsonpath templates by default.

Add support for allowing/disallowing missing keys in go templates
(default=allow).

Add --allow-missing-template-keys flag to control this behavior
(default=true / allow missing keys).
2017-01-09 10:35:46 -05:00
Xing Zhou 5edac7c575 Add software versions to "kubectl get nodes -o wide" output.
Added "OS-IMAGE" and "KERNEL-VERSION" two columns to
"kubectl get nodes -o wide" output. This will help to provide
more information for user to locate or debug issues. See discussion
in ticket #25579
2017-01-09 03:06:28 +00:00
shiywang 31c4d158af move wideHeader string into handlerEntry
change var name, remove formatWideHeaders()

go fmt
2017-01-06 14:20:50 +08:00
Xing Zhou 4fcc770367 Add three more columns to `kubectl get deploy -o wide` output.
Added CONTAINER(S), IMAGE(S) and SELECTOR fields to the output
of `kubectl get deploy -o wide`.
2016-12-28 03:07:13 +00:00
Jordan Liggitt 12806be2bf
Fix tests using internal types for generic printing 2016-12-09 16:26:05 -05:00
Clayton Coleman 3454a8d52c
refactor: update bazel, codec, and gofmt 2016-12-03 19:10:53 -05:00
Clayton Coleman 5df8cc39c9
refactor: generated 2016-12-03 19:10:46 -05:00
Clayton Coleman 35a6bfbcee
generated: refactor 2016-11-23 22:30:47 -06:00
Kubernetes Submit Queue a551dff534 Merge pull request #35901 from justinsb/kubectl_show_labels
Automatic merge from submit-queue

kubectl: show node label if defined

We are moving towards marking master nodes as tainted, and not
necessarily unschedulable.  Further now we encourage users to taint
nodes, marking them unschedulable.

Thus the reliance on "Unschedulable" is not really a great indicator for
the master.

Instead, recognize the existing node 'role' markers, and surface them
where Unschedulable is (in the status).

We recognize:

 * a kubernetes.io/role label
 * a kubeadm.alpha.kubernetes.io/role label
~a taint with Key 'dedicated'~

Fix #33533
2016-11-10 03:12:33 -08:00
Marcin 9cee1456a6 Describe and get support for the updated api + tests 2016-11-09 13:39:16 +01:00
Justin Santa Barbara 98f7c3919e kubectl: show node label if defined
We are moving towards marking master nodes as tainted, and not
necessarily unschedulable.  Further now we encourage users to cordon
nodes, marking them unschedulable.

Thus the reliance on "Unschedulable" is not really a great indicator for
the master.

So, recognize the existing node 'role' markers, and surface them
where Unschedulable is (in the status).

We recognize:

 * a kubernetes.io/role label
 * a kubeadm.alpha.kubernetes.io/role label

Fix #33533
2016-11-07 18:38:21 -05:00
Lukasz Zajaczkowski b7da874789 Add NodePort value in kubectl output 2016-10-17 07:57:34 +02:00
Łukasz Oleś 5d2e215652 Add NumberReady to DaemonSet status
Fixes #25605
2016-10-12 15:15:10 +02:00
Kubernetes Submit Queue 882d431f96 Merge pull request #33552 from floreks/kubectl-node-external-ip
Automatic merge from submit-queue

kubectl: Add external ip information to node when '-o wide' is used

<!--  Thanks for sending a pull request!  Here are some tips for you:
1. If this is your first time, read our contributor guidelines https://github.com/kubernetes/kubernetes/blob/master/CONTRIBUTING.md and developer guide https://github.com/kubernetes/kubernetes/blob/master/docs/devel/development.md
2. If you want *faster* PR reviews, read how: https://github.com/kubernetes/kubernetes/blob/master/docs/devel/faster_reviews.md
3. Follow the instructions for writing a release note: https://github.com/kubernetes/kubernetes/blob/master/docs/devel/pull-requests.md#release-notes
-->

**Which issue this PR fixes**: fixes #33457

**Special notes for your reviewer**: 
1. Is it possible to expose multiple external ips on the node?
2. Should this be supported or first one be taken like now? 
3. Should more node address types be shown?

I'll add tests if solution is approved.

**Release note**:
<!--  Steps to write your release note:
1. Use the release-note-* labels to set the release note state (if you have access) 
2. Enter your extended release note in the below block; leaving it blank means using the PR title as the release note. If no release note is required, just write `NONE`. 
-->
```release-note
kubectl: Add external ip information to node when '-o wide' is used
```
2016-10-07 21:10:27 -07:00
deads2k 518d5500c7 remove testapi.Default.GroupVersion 2016-10-07 10:10:54 -04:00
Sebastian Florek 776c551523
kubectl: Add external ip information to node when '-o wide' is used 2016-09-29 13:25:06 +02:00
juanvallejo 7000e2cf4f
add resource handling before printing
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.
2016-09-21 10:03:59 -04:00
vefimova f20c40ed65 Added warning msg for `kubectl get`
- added warning description regarding terminated objects to `get` long help message
  - added printing of warning message in case of `get pods` if there are hidden pods
Fixes #22986
2016-08-15 22:49:37 +00:00
juanvallejo 620758c7e9 format resource printing with aliases 2016-08-04 12:01:25 -04:00
Ivan Shvedunov 5ed881c6c4 Refactor Printer arguments
Fixes #21260
2016-07-14 16:23:02 +03:00
Sylwester Brzeczkowski 19434e1b58 24133 fix: --no-headers works with custom columns now 2016-07-07 10:04:09 +02:00
juanvallejo 7df60d6b64 display resource type as part of its name 2016-07-01 12:58:02 -04:00
David McMahon ef0c9f0c5b Remove "All rights reserved" from all the headers. 2016-06-29 17:47:36 -07:00
Rudi Chiarito 40f76a95cb AWS: kubectl get service should print hostnames for LoadBalancer services
Fixes #21526

Also test wide outputs. We only guarantee the first IP to be fully printed
if multiple ingresses are present. For AWS, which has no ingress IPs, but
only hostnames, the ELB hostname will be truncated, unless -o=wide is
specified.
2016-06-08 19:29:48 -04:00
Clayton Coleman c6961d6fd6
Remove runtime.Typer, reduce to ObjectKinds(1) (3)
Remove the unnecessary variants, which avoids allocations in several
core paths.
2016-05-21 23:55:42 -04:00
Clayton Coleman 51b624103f
Change ConvertToVersion to use GroupVersion
Long delayed refactor, avoids a few more allocations.
2016-05-12 10:10:35 -04:00
Clayton Coleman fdb110c859
Fix the rest of the code 2016-04-29 17:12:10 -04:00
Maciej Szulik a3b4447305 Move internal types of job from pkg/apis/extensions to pkg/apis/batch 2016-04-25 11:03:54 +02:00
harry b0900bf0d4 Refactor diff into sub pkg 2016-03-21 20:21:39 +08:00
Wojciech Tyczynski 89585237cd Rename RawJSON to Raw in runtime.RawExtension and add ContentType & ContentEncoding. 2016-03-18 12:35:27 +01:00
Jordan Liggitt 5e68cec23c Test relative timestamps using UTC 2016-03-13 20:46:59 -04:00
AdoHe c56c4c87f7 kubectl add AGE column to job, ingress and daemonset 2016-02-28 00:59:01 -05:00
AdoHe aa6f07636b kubectl add job DESIRED column 2016-02-25 10:43:04 -05:00
AdoHe aa5c036a5c add DESIRED and CURRENT columns to rcs,ds,rs 2016-02-23 10:11:19 -05:00
AdoHe f6b5eca11c kubectl print ingress add column labels 2016-02-14 04:28:44 -05:00
AdoHe 714d12cf72 kubectl add show-labels flag to make it more readable 2016-02-04 02:08:44 -05:00
k8s-merge-robot 311d8f8ab9 Merge pull request #20009 from janetkuo/kubectl-get-deployments
Auto commit by PR queue bot
2016-01-30 04:16:27 -08:00
Janet Kuo f49aef535d Print availableReplicas when kubectl get deployments 2016-01-28 20:11:59 -08:00
liggitt 5a59dac0dd Export PrintOptions struct 2016-01-28 20:12:37 -05:00
Clayton Coleman 2fd38a7dc0 Break kubectl from assuming details of codecs
Most of the logic related to type and kind retrieval belongs in the
codec, not in the various classes. Make it explicit that the codec
should handle these details.

Factory now returns a universal Decoder and a JSONEncoder to assist code
in kubectl that needs to specifically deal with JSON serialization
(apply, merge, patch, edit, jsonpath). Add comments to indicate the
serialization is explicit in those places. These methods decode to
internal and encode to the preferred API version as previous, although
in the future they may be changed.

React to removing Codec from version interfaces and RESTMapping by
passing it in to all the places that it is needed.
2016-01-22 13:27:26 -05:00
Clayton Coleman fb4ea845f1 resource_printer was not leveraging runtime interfaces
In general, everything in kubectl/* needs to be ignorant of api/* unless
it deals with a concrete type - this change forces resource_printer to
accept interface abstractions (that are already part of kubectl).
2016-01-22 13:27:25 -05:00
Clayton Coleman 8f203a28f1 Change runtime.Object signature 2015-12-15 13:36:25 -05:00
k8s-merge-robot a581f04106 Merge pull request #18332 from hurf/fix_time_test
Auto commit by PR queue bot
2015-12-15 05:06:26 -08:00
k8s-merge-robot 637a33924c Merge pull request #18004 from jiangyaoguo/print-absolute-time-when-watch-event
Auto commit by PR queue bot
2015-12-08 22:58:12 -08:00
hurf fb6ea4385b Use fixed days to test translateTimestamp for months
Use fixed days to avoid days in different months.
2015-12-08 15:53:38 +08:00
deads2k 2ee3dfe415 update testapi to eliminate redundant fields 2015-12-07 15:54:26 -05:00