Automatic merge from submit-queue.
Manual cherrypick of #65034 to 1.8: make json serializer case sensitive
fixes partially https://github.com/kubernetes/kubernetes/issues/64612
This PR imports the latest jsoniterator library so that case sensitivity during unmarshalling is optional. The PR also sets Kubernetes json serializer to be case sensitive.
**Release note**:
```release-note
ACTION REQUIRED: Kubernetes JSON deserializer is now case-sensitive to restore compatibility with pre-1.8 servers. If your config files contains fields with wrong case, the config files will be now invalid.
```
/sig api-machinery
/kind bug
/assign caesarxuchao liggitt thockin sttts mbohlool
Kubernetes-commit: 14f8f040a211ecce6f848d1eb73be9c6f759bb93
Automatic merge from submit-queue.
Manual cherrypick of kube-openapi changes for release-1.8
**What this PR does / why we need it**:
Cherry-picks kubernetes/kube-openapi#64 and kubernetes/kube-openapi#67
Fixes bugs that make apiserver panic when aggregating valid but not well formed OpenAPI spec (with empty `Paths`/`Definitions`)
**Release note**:
```release-note
Fixes bugs that make apiserver panic when aggregating valid but not well formed OpenAPI spec
```
/cc @jpbetz
/sig api-machinery
Kubernetes-commit: 4ab16f7d4499fcb3b770b1260fa33855632c7e44
Automatic merge from submit-queue.
Automated cherry pick of #59828: Add a test case for the race in #59822
Cherry pick of #59828 on release-1.8.
#59828: Add a test case for the race in #59822
Kubernetes-commit: fa557ee7921fc8305d4978e66eb653c92ed1a7ce
This prevents a race condition where the sharedIndexInformer was
causeing the processorListener's run and pop method to be started
twice. That violated the SharedInformer's interface guarantee of
sequential delivery and also caused panics on shutdown.
Kubernetes-commit: 8c8b5071cd0484d3c5a7cfbf1d49b81c0b8afe16
Automatic merge from submit-queue.
Automated cherry pick of #57735: Update boilerplate for 2018
Cherry pick of #57735 on release-1.8.
#57735: Update boilerplate for 2018
Kubernetes-commit: a106d59e49c22bd7e232f080eba18a4c8f4acda9
Automatic merge from submit-queue.
Use v0.0.0 gitVersion on branches in support of new .gitattributes solution.
Update bad link as well.
Prefer master branch untyped values.
ref #55353.
Kubernetes-commit: 2eb901553309a391962eaffe73a71fd7196f2a0f
Automatic merge from submit-queue.
Automated cherry pick of #56415
Cherry pick of #56415 on release-1.8.
#56415: Include ServerName in tls transport cache key
Kubernetes-commit: 39d73e31a3ba741ad591535488cd2942aa4e4759
Automatic merge from submit-queue.
Automated cherry pick of eac2049
Cherry pick of eac2049 on release-1.8.
eac2049: avoid Registry in fake REST client
Kubernetes-commit: c1d1b92688176f37893d81cf6d7a3abc5663a795
Automatic merge from submit-queue.
Automated cherry pick of #55353
Cherry pick of #55353 on release-1.8.
#55353: Capture git export-subst strings in version.sh for 'git
Kubernetes-commit: 244755cbe49b89530d1ff8d493d0e2c1d7871b65
Automatic merge from submit-queue.
Automated cherry pick of #54921
Cherry pick of #54921 on release-1.8.
#54921: rename metric reflector_xx_last_resource_version to
Kubernetes-commit: f12e7b803b97096072cdde4e7d17b7dd9c8ca8b2
Automatic merge from submit-queue.
Automated cherry pick of #54257
Cherry pick of #54257 on release-1.8.
#54257: Use GetByKey() in typeLister_NonNamespacedGet
**Release note**:
```
Optimize excessive memory allocation in resource listers on GET requests
```
Kubernetes-commit: 4eba842e01f33a5e2d85a2f4aae90a52ad27f6fe
Previously, the fake RESTClient in client-go required a Registry. It
used the Registry to fetch the GroupVersion for the fake client.
However, the way it did so was dubious in some cases (it hard-coded the
default API group in places), and not strictly necssary.
This updates the fake client to just recieve the GroupVersion and
internal group name directly, instead of requiring a Registry, so that
it can be consumed in unit tests where a Registry isn't necessarily
readily available (e.g. elsewhere in client-go).
Kubernetes-commit: af2bb704411263e725c360f68d13c8cf233ecf91
Automatic merge from submit-queue (batch tested with PRs 52843, 52710, 52821, 52844). 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-staging-godeps: only mangle staging repos in staging Godeps.json
- this re-adds non-staging k8s.io/* repos to the staging Godeps.jsons
- x-outs instead of removing of staging dependencies in order to get a
precise trigger for a complete godep restore+save run in the publisher
bot.
The first breaks k8s.io/kube-aggregator's staging export.
The second potentially leads to inconsistent godeps in our exported staging repos.
Kubernetes-commit: 3ba46ee9fab32ccaeeee4af4a80375e6e1d71ace
Automatic merge from submit-queue (batch tested with PRs 52227, 52120)
Fix discovery restmapper finding resources in non-preferred versions
Fixes: #52219
Also reverts behavioral changes to tests that version-qualified cronjobs to work around this issue.
The discovery rest mapper was only populating the priority rest mapper's search list with preferred groupversions.
That meant that if a resource existed in multiple non-preferred versions, AND did not exist in the preferred version (like cronjob, which only exists in v1beta2.batch and v2alpha1.batch, but not v1.batch), the priority restmapper would not find it in its group/version priority list, and would return an error.
```release-note
Fixed an issue looking up cronjobs when they existed in more than one API version
```
Kubernetes-commit: 77e660ed15e927e4e901f42bb3f6790775f8107d
Automatic merge from submit-queue (batch tested with PRs 51824, 50476, 52451, 52009, 52237)
Plumbing the proxy dialer to the webhook admission plugin
* Fixing https://github.com/kubernetes/kubernetes/issues/49987. Plumb the `Dial` function to the `transport.Config`
* Fixing https://github.com/kubernetes/kubernetes/issues/52366. Let the webhook admission plugin sets the `TLSConfg.ServerName`.
I tested it in my gke setup. I don't have time to implement an e2e test before 1.8 release. I think it's ok to add the test later, because *i)* the change only affects the alpha webhook admission feature, and *ii)* the webhook feature is unusable without the fix. That said, it's up to my reviewer to decide.
Filed https://github.com/kubernetes/kubernetes/issues/52368 for the missing e2e test.
( The second commit is https://github.com/kubernetes/kubernetes/pull/52372, which is just a cleanup of client configuration in e2e tests. It removed a function that marshalled the client config to json and then unmarshalled it. It is a prerequisite of this PR, because this PR added the `Dial` function to the config which is not json marshallable.)
```release-note
Fixed the webhook admission plugin so that it works even if the apiserver and the nodes are in two networks (e.g., in GKE).
Fixed the webhook admission plugin so that webhook author could use the DNS name of the service as the CommonName when generating the server cert for the webhook.
Action required:
Anyone who generated server cert for admission webhooks need to regenerate the cert. Previously, when generating server cert for the admission webhook, the CN value doesn't matter. Now you must set it to the DNS name of the webhook service, i.e., `<service.Name>.<service.Namespace>.svc`.
```
Kubernetes-commit: 7181dd49460787871b602a47ab2ad05babacb820
Automatic merge from submit-queue
use specified discovery information if possible
Fixes https://github.com/kubernetes/kubernetes/issues/49948
This uses the available discovery information if available, but it seems we never updated "normal" resources to show the singular name, so its often not available. I've left this code compatible.
@enisoc @ash2k
@kubernetes/sig-api-machinery-misc
```release-note
custom resources that use unconventional pluralization now work properly with kubectl and garbage collection
```
Kubernetes-commit: e190f391129260527c119fe319216212c916ae5d