Skip to content
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

Support sort-by timestamp in kubectl get #25600

Merged
merged 1 commit into from
May 23, 2016

Conversation

janetkuo
Copy link
Member

@janetkuo janetkuo commented May 13, 2016

Pull Request Guidelines

  1. Please read our contributor guidelines.
  2. See our developer guide.
  3. Follow the instructions for labeling and writing a release note for this PR in the block below.

Before:

$ kubectl get svc --sort-by='{.metadata.creationTimestamp}'
proto: no encoder for TypeMeta unversioned.TypeMeta [GetProperties]
proto: tag has too few fields: "-"
proto: no coders for struct *reflect.rtype
proto: no encoder for sec int64 [GetProperties]
proto: no encoder for nsec int32 [GetProperties]
proto: no encoder for loc *time.Location [GetProperties]
proto: no encoder for Time time.Time [GetProperties]
proto: no coders for intstr.Type
proto: no encoder for Type intstr.Type [GetProperties]
F0513 16:46:49.499894   29562 sorting_printer.go:182] Field {.metadata.creationTimestamp} in TypeMeta:<kind:"Service" apiVersion:"v1" > metadata:<name:"kubernetes" generateName:"" namespace:"default" selfLink:"/api/v1/namespaces/default/services/kubernetes" uid:"b88b4739-1964-11e6-9ac3-64510658e388" resourceVersion:"8" generation:0 creationTimestamp:<2016-05-13T16:45:06-07:00> labels:<key:"component" value:"apiserver" > labels:<key:"provider" value:"kubernetes" > > spec:<ports:<name:"https" protocol:"TCP" port:443 targetPort:<type:0 intVal:443 strVal:"" > nodePort:0 > clusterIP:"10.0.0.1" type:"ClusterIP" sessionAffinity:"ClientIP" loadBalancerIP:"" > status:<loadBalancer:<> >  is an unsortable type: struct, err: unsortable type: struct

After:

$ kubectl get svc --sort-by='{.metadata.creationTimestamp}'
NAME         CLUSTER-IP   EXTERNAL-IP   PORT(S)   AGE
kubernetes   10.0.0.1     <none>        443/TCP   48s
frontend     10.0.0.108   <none>        80/TCP    10s

@kubernetes/kubectl

Analytics

@0xmichalis
Copy link
Contributor

There is #25022 already but I think I like this solution more

@zhouhaibing089
Copy link
Contributor

Hmm.. feel free to close #25022 if needed.

@smarterclayton
Copy link
Contributor

I wouldn't ever expect to see

proto: no encoder for nsec int32 [GetProperties]

On Sat, May 14, 2016 at 11:19 AM, zhouhaibing089 notifications@github.com
wrote:

Hmm.. feel free to close #25022
#25022 if needed.


You are receiving this because you are on a team that was mentioned.
Reply to this email directly or view it on GitHub
#25600 (comment)

@k8s-github-robot k8s-github-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label May 15, 2016
@brendandburns brendandburns added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label May 16, 2016
@brendandburns
Copy link
Contributor

@janetkuo LGTM, can you clean up the release note stuff (I think this should have a brief release note)

@k8s-github-robot k8s-github-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label May 16, 2016
@janetkuo janetkuo force-pushed the sort-by-timestamp branch from a728e46 to a178b5d Compare May 19, 2016 04:50
@janetkuo janetkuo added release-note-none Denotes a PR that doesn't merit a release note. release-note Denotes a PR that will be considered when it comes time to generate release notes. lgtm "Looks good to me", indicates that a PR is ready to be merged. and removed needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. release-note-label-needed release-note-none Denotes a PR that doesn't merit a release note. labels May 19, 2016
@k8s-github-robot k8s-github-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels May 19, 2016
@k8s-bot
Copy link

k8s-bot commented May 23, 2016

GCE e2e build/test passed for commit a178b5d.

@k8s-github-robot
Copy link

Automatic merge from submit-queue

@k8s-github-robot k8s-github-robot merged commit 88766e8 into kubernetes:master May 23, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/kubectl lgtm "Looks good to me", indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants