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

Reduce some tab spacing in kubectl #6126

Merged
merged 1 commit into from
Mar 28, 2015
Merged

Reduce some tab spacing in kubectl #6126

merged 1 commit into from
Mar 28, 2015

Conversation

ghodss
Copy link
Contributor

@ghodss ghodss commented Mar 28, 2015

kubectl get pods in the old way:

$ go run cmd/kubectl/kubectl.go get pods
POD                 IP                  CONTAINER(S)        IMAGE(S)                                                   HOST                                    LABELS
       STATUS              CREATED
noop-worker         10.3.113.2          noop-worker         docker-registry01.dev.box.net/jenkins/noop-worker:latest   compute-node02.dev.box.net/10.3.89.74   name=noop,type=worker
       Running             2 weeks
noop-worker-cert    10.3.112.2          noop-worker         docker-registry01.dev.box.net/jenkins/noop-worker          compute-node01.dev.box.net/10.3.89.73   name=noop-cert,type=wo
rker   Running             3 weeks
                                        cert-fetcher        docker-registry01.dev.box.net/jenkins/certfetcher

New way with this PR:

$ go run cmd/kubectl/kubectl.go get pods
POD                IP           CONTAINER(S)   IMAGE(S)                                                   HOST                                    LABELS                       STATUS
    CREATED
noop-worker        10.3.113.2   noop-worker    docker-registry01.dev.box.net/jenkins/noop-worker:latest   compute-node02.dev.box.net/10.3.89.74   name=noop,type=worker        Runnin
g   2 weeks
noop-worker-cert   10.3.112.2   noop-worker    docker-registry01.dev.box.net/jenkins/noop-worker          compute-node01.dev.box.net/10.3.89.73   name=noop-cert,type=worker   Runnin
g   3 weeks
                                cert-fetcher   docker-registry01.dev.box.net/jenkins/certfetcher

It's a small change (mostly reducing minimum column width from 20 to 10) but it helps when you have long fields (like a long image name or lots of labels).

@vmarmol vmarmol self-assigned this Mar 28, 2015
@vmarmol
Copy link
Contributor

vmarmol commented Mar 28, 2015

Nice, thanks @ghodss! I've suffered from this many times.

@vmarmol vmarmol added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Mar 28, 2015
@vmarmol
Copy link
Contributor

vmarmol commented Mar 28, 2015

Looks like ExamplePrintReplicationController is failing.

@ghodss
Copy link
Contributor Author

ghodss commented Mar 28, 2015

I'm having a really hard time figuring out what is causing that error... where is the comparison that's resulting in that failure?

--- FAIL: ExamplePrintReplicationController (0.00s)
got:
CONTROLLER   CONTAINER(S)   IMAGE(S)    SELECTOR   REPLICAS
foo          foo            someimage   foo=bar    1
want:
CONTROLLER          CONTAINER(S)        IMAGE(S)            SELECTOR            REPLICAS
foo                 foo                 someimage           foo=bar             1
FAIL
FAIL    github.com/GoogleCloudPlatform/kubernetes/pkg/kubectl/cmd       0.038s

@vmarmol
Copy link
Contributor

vmarmol commented Mar 28, 2015

@ghodss it is those last commented lines in the function.

http://golang.org/pkg/testing under examples

@ghodss
Copy link
Contributor Author

ghodss commented Mar 28, 2015

Tricky! Resubmitted.

@vmarmol
Copy link
Contributor

vmarmol commented Mar 28, 2015

Thanks!

vmarmol added a commit that referenced this pull request Mar 28, 2015
@vmarmol vmarmol merged commit b9499b8 into kubernetes:master Mar 28, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm "Looks good to me", indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants