Commit Graph

64119 Commits (6a233b48b48915d218d14c34e01b106b8e35c375)

Author SHA1 Message Date
andyzhangx 520b8d49fc remove IsAbs validation on local volume
use MakeAbsolutePath to convert path in Windows

fix test error: allow relative path for local volume

fix comments

fix comments and add windows unit tests
2018-04-06 13:26:14 +00:00
Ling Huang cbec62ada4 Add support to ingest log entries to Stackdriver against new "k8s_container" and "k8s_node" resources. 2018-04-06 08:47:19 -04:00
Michal Fojtik 40d8a4bf60
Fix getting logs from daemonset 2018-04-06 13:31:59 +02:00
Shyam Jeedigunta da01243af1 Fix IP-alias subnet creation logic 2018-04-06 13:23:38 +02:00
Patrik Erdes c47583099c Make the test TestCRIListPodStats pass for Darwin and Windows
GetPodCgroupNameSuffix is only implemented for Linux, which mean
that CPU and Memory stats are only available on Linux.

My fix to make the test pass on other OS:es than Linux
is to just check CPU and Memory stats on Linux.

(This is similar to #57637 which fixed the same problem for the
test TestCadvisorListPodStats.)
2018-04-06 13:07:26 +02:00
Kubernetes Submit Queue 80bd7510df
Merge pull request #58381 from sttts/sttts-deduplicate-admission-webhooks
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

admission/webhook: deduplicate mutating and validating webhook code

This refactors along: webhook = generic-webhook + source + dispatcher

TODOs:

- [x] refactor unit tests
2018-04-06 03:26:28 -07:00
Dr. Stefan Schimanski f3ba7f9558 apiserver: cancel context on timeout in WithTimeoutForNonLongRunningRequests 2018-04-06 11:21:17 +02:00
Kubernetes Submit Queue a8482ef5ee
Merge pull request #62190 from patrikerdes/macOS
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Change 'Mac OS X' to 'macOS' in build/README.md

Mac OS X was renamed to OS X in 2012, and then renamed again to macOS in 2016.
I suggest that the current name should be used when referencing the Apple OS.

**Release note**:

```release-note
NONE
```
2018-04-06 02:20:23 -07:00
hzxuzhonghu 4eb48436eb Update generated files 2018-04-06 10:17:04 +02:00
Dr. Stefan Schimanski 10969e1b8d admission/webhook: fix panic from empty response in mutating webhooks 2018-04-06 10:16:41 +02:00
Dr. Stefan Schimanski 72f8a369d0 admission/webhook: refactor to webhook = generic-webhook + source + dispatcher
- unify test cases
- remove broken VersionedAttributes override abstraction

  This overriding had no effect. The versioned.Attributes were never
  used as admission.Attributes.Better make the versioned objects
  explicit than hiding them under a wrong abstraction.
- remove wrapping of scheme.Convert
- internalize conversion package
2018-04-06 10:16:41 +02:00
Kubernetes Submit Queue 44ffcdd9c5
Merge pull request #62187 from mikedanese/cluster
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

accelerators: remove Accelerators from feature gates

Passing this flag is preventing clusters from coming up:

```
server.go:165] unrecognized key: Accelerators
```
2018-04-06 00:11:09 -07:00
wojtekt 112a28b48f Fix resize nodes tests for Regional Clusters 2018-04-06 08:37:27 +02:00
Kubernetes Submit Queue 5898d5915a
Merge pull request #62133 from AishSundar/patch-1
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Migrating test images to gcr.io/kubernetes-e2e-test-images

**What this PR does / why we need it**:
Currently e2e test images are distributed between 2 different registry locations, k8s.gcr.io and gcr.io/kubernetes-e2e-test-images. This is part of a multi-step initiative to house all the images in gcr.io/kubernetes-e2e-test-images.

**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
Fixes #62131

**Special notes for your reviewer**:
1. I am starting off with migrating images under k8s/test/images/volumes-tester. 
2. I did not move ceph and nfs images since they are marked for [deprecation and removal](https://github.com/kubernetes/kubernetes/tree/master/test/images/volumes-tester). Let me know if we want them moved as well.
3. I have made a copy of the images in gcr.io/kubernetes-e2e-test-images so the references are not broken post the PR merge. Will work on removing the images from k8s.gcr.io once this change sticks.
2018-04-05 23:17:41 -07:00
Dobes Vandermeer c73cb05a7e
Capture kernel logs in example fluentd.conf
I find it useful to have the kernel logs available for searching, for example that's the only place you can see processes killed when they hit memory limits.
2018-04-05 23:10:14 -07:00
Manjunath A Kumatagi 1bb810e749 Use pause manifest image 2018-04-06 11:00:50 +05:30
Kubernetes Submit Queue 07d1a8cb0c
Merge pull request #61216 from hanxiaoshuai/fixtodo0315
Automatic merge from submit-queue (batch tested with PRs 59285, 61216). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

add unit test for func parsePorts and validate

**What this PR does / why we need it**:
add unit test for func parsePorts and validate
**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
Fixes #

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2018-04-05 19:49:09 -07:00
Kubernetes Submit Queue 08f931d84a
Merge pull request #59285 from Addepar/fix-apply-logging
Automatic merge from submit-queue (batch tested with PRs 59285, 61216). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Do not log unchanged message if a format other than 'name' is specified

**What this PR does / why we need it**:
When specifying an output format, the "unchanged" message screws up the output format.

**Which issue(s) this PR fixes**:
Fixes #58836

**Special notes for your reviewer**: N/A

**Release note**:

```release-note
NONE
```
2018-04-05 19:49:06 -07:00
Mike Danese e864ce38a7 accelerators: remove Accelerators from feature gates 2018-04-05 19:48:52 -07:00
Kubernetes Submit Queue fa7d5151e4
Merge pull request #62080 from agau4779/ingress-http2-e2e
Automatic merge from submit-queue (batch tested with PRs 60102, 59970, 60021, 62011, 62080). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

[GCE] Ingress HTTP2 e2e test

**What this PR does / why we need it**:
- Adds e2e test for bringing up an HTTP2 Ingress, converting it to HTTPS, then back to HTTP2
- Update echoserver image to 1.10

**Release note**:
```release-note
NONE
```
2018-04-05 18:47:10 -07:00
Kubernetes Submit Queue 72a24128d5
Merge pull request #62011 from hanxiaoshuai/fixtodo0402
Automatic merge from submit-queue (batch tested with PRs 60102, 59970, 60021, 62011, 62080). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

fixtodo:generate an event for a missed starting window

**What this PR does / why we need it**:
fixtodo:generate an event for a missed starting window
**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
Fixes #

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2018-04-05 18:47:07 -07:00
Kubernetes Submit Queue 7bde13f191
Merge pull request #60021 from nikhita/sample-controller-subresources
Automatic merge from submit-queue (batch tested with PRs 60102, 59970, 60021, 62011, 62080). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

sample-controller: add status subresource support

Builds on top of https://github.com/kubernetes/kubernetes/pull/55168.

**DO NOT MERGE** until https://github.com/kubernetes/kubernetes/pull/55168 is merged. Adding a hold.
/hold

Update: It is now merged! 🎉 

This PR:

- Adds an example to show how to use the `/status` subresource with custom resources.
- Generates `UpdateStatus` for the `Foo` resource.
- Updates the comment in the controller to mention that `UpdateStatus` can now be used. Note: this is not enabled by default because subresources require the feature gate to be enabled and are not on by default.
- Updates the README to add feature gate information and examples for `CustomResourceSubresources`.
- Updates the README to remove feature gate information for CRD validation since the current example uses `apps/v1` deployments (and thus requires v1.9 anyway).

**Release note**:

```release-note
NONE
```

/assign sttts munnerz
2018-04-05 18:47:05 -07:00
Kubernetes Submit Queue 6dfcaabe84
Merge pull request #59970 from anubhakushwaha/Update_deployment_example
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Updated the "create-update-delete-deployment" example to use apps/v1 and removed rollback example

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

*Waiting for migration to apps/v1*
> The current example at [create-update-delete-deployment/main.go](https://github.com/kubernetes/kubernetes/blob/master/staging/src/k8s.io/client-go/examples/create-update-delete-deployment/main.go) was using `RollbackTo` of `v1beta1.DeploymentSpec` which is deprecated.

The current implementation upgrades `create-update-delete-deployment` main.go to use **apps/v1** instead of **extensions/v1beta1** and removed rollback example for now. 

**Which issue(s) this PR fixes**
Helps kubernetes/client-go#346

**Special notes for your reviewer**:
Since it's my first PR dealing with codebase and not a typo fix :xD please let me know my mistakes.
I would love to resolve them.

@nikhita @sttts @jekohk Please review. The other PR #59663  got closed accidentally while changing branch.
2018-04-05 18:45:27 -07:00
Kubernetes Submit Queue 4cfa2e4dfd
Merge pull request #60102 from satyasm/gcloud_net_flag
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

fixes #54017, remove deprecated --mode flag

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

**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
Fixes #54017

**Special notes for your reviewer**:

**Release note**:

```release-note
remove deprecated --mode flag in check-network-mode
```
2018-04-05 17:53:00 -07:00
Kubernetes Submit Queue 6d8df0c400
Merge pull request #61445 from resouer/extender-priority
Automatic merge from submit-queue (batch tested with PRs 62063, 62169, 62155, 62139, 61445). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Schedule even if extender is not available when using extender 

**What this PR does / why we need it**:
When using scheduler extender, if the extender is not available scheduling of all pods fail.
We should let the scheduling happen but display error message that extender is failing.

`IsIgnorable()`  is added to extender to indicate: if scheduling of all pods should fail when it's unavailable

**Backward compabtiility:**

We use `IsIgnorable` instead of `IsCritical` so that when this flag is not set, the default value will be `false`, i.e. not ignorable, which consistent with the current behavior in existing extenders.

**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
Fixes: #60616

**Special notes for your reviewer**:
kindly cc @ravisantoshgudimetla to see if this meets your expectation

TODO: update the examples in kubernetes/examples, but the strategy there is not clear to me for now

**Release note**:

```release-note
Schedule even if extender is not available when using extender 
```
2018-04-05 17:42:13 -07:00
Kubernetes Submit Queue 57d723ddc2
Merge pull request #62139 from juanvallejo/jvallejo/begin-wiring-print-flags
Automatic merge from submit-queue (batch tested with PRs 62063, 62169, 62155, 62139, 61445). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

begin wiring printflags through set cmds

**Release note**:
```release-note
NONE
```

Begin wiring PrintFlags struct through commands

cc @deads2k @soltysh
2018-04-05 17:42:10 -07:00
Kubernetes Submit Queue efeb1db2b0
Merge pull request #62155 from soltysh/issue61484
Automatic merge from submit-queue (batch tested with PRs 62063, 62169, 62155, 62139, 61445). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Wait longer in pod cleanup

I've checked the [garbage collector tests](827b3d77cd/test/e2e/apimachinery/garbage_collector.go (L557)) and usually they're waiting up to a minute to clean the resources. So I'm proposing to use that same values when waiting for the pod cleanup. I was not able to reproduce the problem locally, but from reading the logs it looks like the problem might be with just the timing nothing else. 

Related to #61484

/assign @Liujingfang1 @mengqiy
2018-04-05 17:42:06 -07:00
Kubernetes Submit Queue e7ae2c62c6
Merge pull request #62169 from Cynerva/gkk/apiserver-advertise-address
Automatic merge from submit-queue (batch tested with PRs 62063, 62169, 62155, 62139, 61445). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

juju: Set apiserver advertise-address to kube-control ingress address

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

This fixes pod->apiserver traffic not obeying Juju network space bindings, by setting `--advertise-address` on kube-apiserver to the ingress address of the kube-control relation.

**Release note**:

```release-note
NONE
```
2018-04-05 17:42:03 -07:00
Kubernetes Submit Queue 2dee2105d6
Merge pull request #62063 from atlassian/no-mutation-unstructuredcontent
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Make UnstructuredContent return contents without mutating the source

**What this PR does / why we need it**:
This PR solves the issues described in #56316

Before this change:

- A call to `UnstructuredContent()` potentially modified `Object`
- The values returned by `UnstructuredContent()` could be manipulated to modify the value in `Object`. Going through the history it looks like this behavior was added before the addition of `SetUnstructuredContent()`. IMO it makes more sense now to use `SetUnstructuredContent()` or make changes to the exposed `Object` property
- `UnstructuredList` did not implement the behavior described in the godoc. The godoc stated that the value returned should be mutable, but if u.Object == nil the map returned had no effect on Object

With this PR I'm proposing `UnstructuredContent()` returns the data without providing the contract of a mutable map. It also ensures all implementations of the `Unstructured` interface abide by the doc

**Which issue(s) this PR fixes**:
Fixes #56316

**Special notes for your reviewer**:
This PR continues work started in #57713.

**Release note**:
```release-note
NONE
```
/kind bug
/sig api-machinery
/cc sttts deads2k
2018-04-05 17:03:57 -07:00
Kubernetes Submit Queue ea529bc9ad
Merge pull request #62179 from timothysc/owner_labels
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Update OWNERS labels for cluster-lifecycle and scheduling

**What this PR does / why we need it**:
Updates auto labeling to make everyone's lives easier. 


**Special notes for your reviewer**:

**Release note**:

```
NONE
```

/cc @kubernetes/sig-cluster-lifecycle-pr-reviews @kubernetes/sig-scheduling-pr-reviews
2018-04-05 15:25:06 -07:00
Tim Hockin a2f47f5b34 Don't require release tars on kube-down 2018-04-05 17:39:18 -04:00
Michelle Au 8d1cd819ec Use provided node object in volume binding predicate 2018-04-05 14:35:55 -07:00
natronq a923acd042
Run hack/update-codegen.sh 2018-04-05 23:35:14 +02:00
natronq 4f4798a445
code-gen: allow specifying custom resync periods for certain informer types and switch to functional option pattern for SharedInformerFactory 2018-04-05 23:35:14 +02:00
Timothy St. Clair 3d0efc2e5a Update OWNERS labels for cluster-lifecycle and scheduling 2018-04-05 16:25:04 -05:00
Kubernetes Submit Queue aaed11fed7
Merge pull request #61974 from wackxu/rmlan
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

remove pvc node affinity update check since beta NodeAffinity is immu…

…table



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

**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:

xref https://github.com/kubernetes/kubernetes/pull/61816#discussion_r178212208

**Special notes for your reviewer**:
/assign @msau42 

**Release note**:

```release-note
NONE
```
2018-04-05 14:23:51 -07:00
juanvallejo 4b4b6c879a
begin wiring printflags through set cmds 2018-04-05 16:34:51 -04:00
Kubernetes Submit Queue 6a8ebdca90
Merge pull request #61905 from mengqiy/mergePatchesInSMP
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

add a func to merge multiple Strategic Merge Patches into one patch

This PR is adding a function similar to 9fa11df836/merge.go (L95-L100)
It merges multiple SMPs and yield another SMP.

This PR has no risk to existing SMP code.

```release-note
NONE
```
/cc @apelisse
/assign @pwittrock
2018-04-05 13:30:03 -07:00
Ashley Gau b3da740343 move http2 test into ingress context. use helper method 2018-04-05 13:26:55 -07:00
Ashley Gau f057be8119 Add http2 <-> https conversion test 2018-04-05 13:26:55 -07:00
Ashley Gau 7f62dd2e79 use echoserver 1.10 2018-04-05 13:26:55 -07:00
Patrik Erdes 0f98dd0950 Change 'Mac OS X' to 'macOS' in build/README.md
Mac OS X was renamed to OS X in 2012, and then renamed again to macOS in 2016.
I suggest that the current name should be used when referencing the Apple OS.
2018-04-05 22:16:38 +02:00
Anago GCB 21ba3d0fc6 Update CHANGELOG-1.8.md for v1.8.11. 2018-04-05 13:15:26 -07:00
Kubernetes Submit Queue e6cdfb300e
Merge pull request #62172 from shyamjvs/ip-alias-subnet-fix
Automatic merge from submit-queue (batch tested with PRs 62162, 60628, 62172). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

When using custom network with IP-alias, use the former's subnet for the latter too

Currently, when we're using custom subnet and ip-alias simultaneously, the cluster fails to come up.
The reason is because we're creating a subnet in the former with one name, but expecting a differently named subnet for the latter.

This is causing [continuous failures in our 100-node job](https://k8s-testgrid.appspot.com/sig-scalability-gce#gce) where I recently turned both of them on.

cc @kubernetes/sig-network-bugs 

```release-note
NONE
```
2018-04-05 12:33:08 -07:00
Kubernetes Submit Queue 0354cac6f4
Merge pull request #60628 from sttts/sttts-global-requestcontextmapper-in-delegation
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

apiserver: enforce global RequestContextMapper in delegation chain

Having a request context mapper in the generic config makes it easy to forget setting
a common mapper for the whole delegation chain. This PR moves it into the New
constructors that already have the delegationTarget argument. So it is obvious
that the mapper is passed down as well.

Fixes https://github.com/kubernetes/kubernetes/issues/60610
2018-04-05 12:32:18 -07:00
nikhiljindal c4fcb1e8cb Updating kubemci remove-clusters e2e test to use --force to remove from all clusters 2018-04-05 11:49:36 -07:00
Kubernetes Submit Queue 83c66aa1f8
Merge pull request #62162 from sttts/sttts-fix-bindata
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Fix kubectl bindata
2018-04-05 11:44:10 -07:00
Kubernetes Submit Queue fe5ba9374f
Merge pull request #62148 from mengqiy/fix_gen_bindata
Automatic merge from submit-queue (batch tested with PRs 62160, 62148). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

fix generated bindata

Changes in https://github.com/kubernetes/kubernetes/pull/60878/files cause test failure
e.g. log: https://k8s-gubernator.appspot.com/build/kubernetes-jenkins/pr-logs/pull/61905/pull-kubernetes-verify/84901/

The failing test was complaining about 
```
   #: pkg/kubectl/cmd/describe.go:86
   msgid "Show details of a specific resource or group of resources"
  -msgstr "Mostra i dettagli di una specifiche risorsa o un gruppo di risorse"
  +msgstr "Mostra i dettagli di una specifica risorsa o un gruppo di risorse"
```
This failing test blocks all the change in `staging/`.

The change in this PR is generated by run `hack/generate-bindata.sh`

```release-note
NONE
```
2018-04-05 11:37:03 -07:00
Kubernetes Submit Queue 5b0906b989
Merge pull request #62160 from wojtek-t/fix_disruptive_regional_tests
Automatic merge from submit-queue (batch tested with PRs 62160, 62148). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Fix disruptive tests for GKE regional clusters
2018-04-05 11:37:00 -07:00
Kubernetes Submit Queue 9f4b851e91
Merge pull request #56629 from luksa/fix_custom_column_alignment
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Fix bad column alignment when using custom columns from OpenAPI schema

Columns printed by `kubectl get` weren't aligned properly when they were coming from the OpenAPI schema. 

This was caused by `CustomColumnPrinter.PrintObj`, which was creating a new `tabwriter.Writer` instead of re-using the tabwriter received through the `out` method parameter (basically, a tabwriter was writing to another tabwriter). Because the PrintObj flushed the tabwriter after writing each individual line, the column widths would reset.

**What this PR does / why we need it**:
This PR fixes the bad column alignment.

**Which issue(s) this PR fixes** 
Fixes #56282 

**Special notes for your reviewer**:
I've aligned how `CustomColumnPrinter.PrintObj` handles tabwriter with how `HumanReadablePrinter.PrintObj` does it (see https://github.com/kubernetes/kubernetes/blob/master/pkg/printers/humanreadable.go#L299-L303)

**Release note**:
```release-note
Fixed column alignment when kubectl get is used with custom columns from OpenAPI schema
```
2018-04-05 09:56:41 -07:00