Commit Graph

956 Commits

Author SHA1 Message Date
Antoine Pelisse
47e8ee9097 Update kube-openapi to use validation
Kubernetes-commit: 8f7262e819c58a6ee3f9315af37884b1fe0bfb44
2017-11-01 11:20:15 -07:00
James Munnelly
7fd6807de4 run hack/update-bazel.sh
Kubernetes-commit: 9b1a1231dae9c720b3c0837e42e3c8f680868df1
2017-11-01 15:10:35 +00:00
James Munnelly
a6812b3f80 run hack/update-codegen.sh
Kubernetes-commit: 6a4b80fcabc5e950af997d97f447354b83fcdcc4
2017-11-01 14:32:22 +00:00
Wei Wei
73c17354d4 rename metric reflector_xx_last_resource_version to reflector_last_resource_version{name="xx"}
Kubernetes-commit: bca495e2291b0a888d5aaee10e901ddb28e937b2
2017-11-01 16:34:18 +08:00
Chao Xu
98d1cb61d1
Merge pull request #316 from caesarxuchao/update-readme
Update README.md to explain kubernetes tags and the v5.0.0 tag
2017-10-31 19:48:53 -07:00
Chao Xu
3f3e5f4ba3 update README.md 2017-10-31 19:47:32 -07:00
Chao Xu
62be166cec Update dep support 2017-10-31 19:36:26 -07:00
Antoine Pelisse
fba05540b8 Update truncateBody to not truncate with high level
And add a unit-tests to verify that it works properly.

Kubernetes-commit: a63ecc4a92b28eb12bde1b321c8d6ce8e3ae4191
2017-10-30 10:20:46 -07:00
Solly Ross
742a5f2338 [client-go] Add apps.Scale support to Scale client
apps/v1betaX inadventertently contains its own variant of Scale.  In
order to support scaling Deployments, ReplicaSets, etc, we need to support
these versions of Scale as well.

Kubernetes-commit: 2c9fc432947bedb2fffc12faf7fc0ee1d0ceffd9
2017-10-27 17:51:05 -04:00
Kubernetes Publisher
dbe8fe09ed Merge pull request #54600 from marun/enable-federation-vendoring
Automatic merge from submit-queue (batch tested with PRs 54081, 54271, 51783, 54600, 54594). 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 to latest kube-openapi and kazel

- update vendored kube-openapi to include https://github.com/kubernetes/kube-openapi/pull/14
 - update hash of repo infra used for bazel generation so kazel includes https://github.com/kubernetes/repo-infra/pull/48

This is the final step in enabling federation to generate openapi code for itself and vendored kube (#54335).

/sig multicluster testing

Kubernetes-commit: 3f5f9c3df96618f6fc447fc98d9fc7ba97b0e333
2017-10-26 12:11:47 +00:00
Kubernetes Publisher
1994b6c21b Merge pull request #52717 from FengyunPan/remove-LbassV1
Automatic merge from submit-queue (batch tested with PRs 52717, 54568, 54452, 53997, 54237). 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>.

[OpenStack]Remove the LbaasV1 of OpenStack cloud provider

The Neutron LbaasV1 has been declared obsolete, LbaasV2 is a
better choice.
So let's remove the codes of LbaasV1, only support LbaasV2.
xref: #52609
Reference OpenStack doc:
https://docs.openstack.org/mitaka/networking-guide/config-lbaas.html

**Special notes for your reviewer**:
/assign @dims
/assign @anguslees

**Release note**:
```release-note
Remove the LbaasV1 of OpenStack cloud provider, currently only support LbaasV2.
```

Kubernetes-commit: b2b31ada149fb688aea0d62cd58e5416d5fd337b
2017-10-26 12:11:25 +00:00
Kubernetes Publisher
19f27357d1 Merge pull request #53474 from jekohk/clientgo-examples/crud-rollback
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>.

client-go/examples: Update CRUD Deployment sample

**What this PR does / why we need it**:
PR motivated by [#128](https://github.com/kubernetes/client-go/issues/128), namely updating the CRUD example with the following:
- Add new step which demonstrates rolling back deployments
- Cleanup retry loop for `Update()` steps
- Make `-kubeconfig` flag optional when running example (same as out-of-cluster example)
- Update `README.md` to reflect changes

**Special notes for your reviewer**:
My first Kubernetes contribution- feedback very welcome!

**Release note**:

```release-note
NONE
```

/cc @ahmetb @caesarxuchao

Kubernetes-commit: 1ba331ef59220c3f50246a4bfe23350de2c2f5ed
2017-10-26 12:11:03 +00:00
Kubernetes Publisher
accfc9b01e Merge pull request #53743 from DirectXMan12/feature/polymorphic-scale-client
Automatic merge from submit-queue (batch tested with PRs 53743, 53564). 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>.

Polymorphic Scale Client

This PR introduces a polymorphic scale client based on discovery information that's able to scale scalable resources in arbitrary group-versions, as long as they present the scale subresource in their discovery information.

Currently, it supports `extensions/v1beta1.Scale` and `autoscaling/v1.Scale`, but supporting other versions of scale if/when we produce them should be fairly trivial.

It also updates the HPA to use this client, meaning the HPA will now work on any scalable resource, not just things in the `extensions/v1beta1` API group.

**Release note**:
```release-note
Introduces a polymorphic scale client, allowing HorizontalPodAutoscalers to properly function on scalable resources in any API group.
```

Unblocks #29698
Unblocks #38756
Unblocks #49504
Fixes #38810

Kubernetes-commit: ca8d97d673426409116a710503d4bc05ca8207a7
2017-10-26 12:11:03 +00:00
Kubernetes Publisher
d198d1dc19 Merge pull request #54181 from apelisse/update-kube-openapi
Automatic merge from submit-queue (batch tested with PRs 54199, 54181, 54196). 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 openapi to use kube-openapi code

**What this PR does / why we need it**: OpenAPI code has moved to `github.com/kubernetes/kube-openapi`. Let's use that code as a dependency, since now it's duplicated.

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

**Special notes for your reviewer**:

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

No user visible changes. Just code moving around.

Kubernetes-commit: 507790c9c6f50b580b4409b5ac93b10a24570819
2017-10-26 12:10:41 +00:00
Maru Newby
20ecc2c0ac Update vendored kube-openapi to latest
Kubernetes-commit: fae7a7a1e3041a88be38ab614368bc2f08925114
2017-10-25 18:09:39 -07:00
FengyunPan
33ec09b121 Update gophercloud: cleanup lbaas v1
Kubernetes-commit: bf7f1a0610868b29d1add3399329e5f3b2efb890
2017-10-23 18:01:03 +08:00
Chao Xu
271cb504b6 Merge pull request #313 from roycaihw/notesv5
add changelog for v5.0.0
2017-10-20 13:25:32 -07:00
Haowei Cai
182e6d80e3 add changelog for v5.0.0 2017-10-20 12:07:33 -07:00
Kubernetes Publisher
21595ad1ef Merge pull request #54257 from tiran/lister-getbykey
Automatic merge from submit-queue (batch tested with PRs 53194, 54257, 53014). 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>.

Use GetByKey() in typeLister_NonNamespacedGet

The Get() function of non-namespace lister passes a temporary object to
indexer.Get() in order to fetch the actual object from the indexer. This
may cause Go to allocate the temporary object on the heap instead of the
stack, as it is passed into interfaces. For non-namespaced objects,
Get(&Type{ObjectMeta: v1.ObjectMeta{Name: name}}) should be equivalent
to GetByKey(name).

This could be the root cause of excessive allocations, e.g. in tests
clusterRoleLister.Get() has trigger 4 billion allocations. See
openshift/origin#16954

Kubernetes-commit: 4282ab39fc15d8267ceac36398947465867027db
2017-10-20 03:19:12 -07:00
Kubernetes Publisher
f80b026612 Merge pull request #54156 from deads2k/admission-06-restclient
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 admission webhook to accept client config

Fixes https://github.com/kubernetes/kubernetes/issues/53827

This plumbs a complete client through the plugin initializer for admission webhooks.  It achieves parity with our existing webhooks and provides flexibility if people want to do something special or different.  Easy things are easy, hard things are possible.  This does not change behavior for kube-apiserver.

@kubernetes/sig-auth-api-reviews @kubernetes/sig-api-machinery-bugs

Kubernetes-commit: f07b359e5bd5af8947b32309865dada7043d59e3
2017-10-26 12:10:06 +00:00
Kubernetes Publisher
71d5cae011 Merge pull request #54059 from porridge/fix-lint-err
Automatic merge from submit-queue (batch tested with PRs 53696, 54059). 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 lint warnings for useless err checks.

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

This check was recently added to golint.

**Which issue this PR fixes**

Related to #37254

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

Kubernetes-commit: a1e786f1389d7a15a7548afa8015331027717b32
2017-10-26 12:10:05 +00:00
Kubernetes Publisher
a8796a1db2 Merge pull request #53037 from smarterclayton/verify_client_cert
Automatic merge from submit-queue (batch tested with PRs 53978, 54008, 53037). 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>.

Verify the bootstrap client cert before using it

Kubernetes-commit: d91e97f2432d0c96993b56d3bf30e94c69be68de
2017-10-26 12:10:04 +00:00
Kubernetes Publisher
fc5236ea29 Merge pull request #47699 from supereagle/fix-typos
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 typos: remove duplicated word in comments

**What this PR does / why we need it**: Remove the duplicated word `the` in comments

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

**Special notes for your reviewer**:

```release-note
NONE
```

Kubernetes-commit: 1d8f1e268f18e278b93b3ba06ca3c73604bfdb77
2017-10-26 12:10:04 +00:00
Chao Xu
867bf16223 Merge pull request #317 from caesarxuchao/update-5.0.1-changelog
add v5.0.1 to CHANGELOG
2017-10-25 19:17:31 -07:00
Chao Xu
3a6b3c01b1 add 5.0.1 to changelog 2017-10-25 19:14:22 -07:00
Christian Heimes
5fa971246a Run hack/update-bazel.sh
Signed-off-by: Christian Heimes <cheimes@redhat.com>

Kubernetes-commit: 5f9d8ba5a138790c1fa0dcd9ae2cf94b37deeb00
2017-10-19 23:44:34 +02:00
Christian Heimes
7180b8677a Regenerate code with hack/update-codegen.sh
Signed-off-by: Christian Heimes <cheimes@redhat.com>

Kubernetes-commit: 477aadaa2fe91ff22fb4cf0eeecaefbc73d29ef6
2017-10-19 22:19:03 +02:00
Antoine Pelisse
a4c4c24b61 Update openapi to use kube-openapi code
Kubernetes-commit: 3ed58475c4fd99c56bba63059ca75891f417e55a
2017-10-18 15:19:56 -07:00
David Eads
18d0325d5c update admission webhook to accept client config
Kubernetes-commit: 0859798e8e278ec382dcbeb77914f40bf2c78a2c
2017-10-18 12:57:59 -04:00
Marcin Owsiany
c80a7b8142 Fix lint warnings for useless err checks.
This check was recently added to golint.

Kubernetes-commit: 49553d4a7a5179f0cfabbdcb7d3551c21cbcb646
2017-10-17 12:52:54 +02:00
Kubernetes Publisher
076e344c86 Merge pull request #53839 from ixdy/update-bazel-workspace
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 rules_go, repo-infra, and rules_docker dependencies

**What this PR does / why we need it**: several of our bazel dependencies were getting pretty old, since they required bazel 0.5.4+ but there were various failures if we tried to use them with bazel 0.5.4.

Now that bazel 0.6.0 (and 0.6.1) have been out for a while, we can bump our dependencies and get a number of fixes and new functionality.

x-ref #52677 and others

**Special notes for your reviewer**:
* This will now explicitly require bazel 0.6.0+ to build kubernetes.
* Our staging directories are causing some issues for `gazelle`; it wants to set `importpath = "k8s.io/kubernetes/staging/src/k8s.io/blah"` instead of `importpath = "k8s.io/blah"`. I'm not sure what is the correct way to fix this; what we're doing here is pretty weird and nonstandard. I've used a `sed` substitution for now.
* The `-proto=default` option of `gazelle` has a number of bugs right now (https://github.com/bazelbuild/rules_go/issues/888, https://github.com/bazelbuild/rules_go/issues/900, https://github.com/bazelbuild/rules_go/issues/907), so I am forcing the legacy behavior.

**Release note**:

```release-note
NONE
```

/assign @mikedanese @spxtr @BenTheElder

Kubernetes-commit: 77b83e446b4e655a71c315ad3f3890dc2a220ccf
2017-10-16 06:29:26 +00:00
Kubernetes Publisher
10a3c2dff4 Merge pull request #53830 from juanvallejo/jvallejo/prevent-delta-fifo-store-panic
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>.

perform nil check before iterating over keys

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

Fixes panic due to nil pointer dereference

Related downstream bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1377940
cc @smarterclayton

Kubernetes-commit: 8cbc9d7e27104cb18b1c5b7c60a9c4927d170b78
2017-10-16 06:29:25 +00:00
Kubernetes Publisher
77fb8363ad Merge pull request #53441 from apelisse/completely-remove-swagger
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>.

kubectl: Remove swagger 1.2 entirely.

**What this PR does / why we need it**:
Remove dead code since nothing is using swagger 1.2 anymore. This doesn't change any feature, it's just removing unused code.

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: Follow up on #44589

**Special notes for your reviewer**:

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

Kubernetes-commit: 24cf4a8b5c1488f615ae64b9e3a30ee1d3d83333
2017-10-16 06:29:25 +00:00
Kubernetes Publisher
2f42898d3b Merge pull request #52949 from smarterclayton/enable_paging
Automatic merge from submit-queue (batch tested with PRs 52354, 52949, 53551). 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>.

Enable API chunking and promote to beta for 1.9

All list watchers default to using chunking.  The server by default fills pages to avoid low cardinality filters from making excessive numbers of requests.  Fix an issue with continuation tokens where a `../` could be used if the feature was enabled.

```release-note
API chunking via the `limit` and `continue` request parameters is promoted to beta in this release.  Client libraries using the Informer or ListWatch types will automatically opt in to chunking.
```

Kubernetes-commit: 23cc4dc50ab223751d5a7983faa3fa6b811f2255
2017-10-16 06:29:04 +00:00
Kubernetes Publisher
41b0611ef6 Merge pull request #53525 from sttts/sttts-scheme-copier-romoval
Automatic merge from submit-queue (batch tested with PRs 53525, 53652). 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>.

apimachinery: remove ObjectCopier interface(s)

The big commit is a mechanical, transitive removal of the copier interfaces in all structs and function calls.

Kubernetes-commit: aaf14d4619ddae90ec753959053a74967832058c
2017-10-16 06:29:03 +00:00
Kubernetes Publisher
bee45f3389 Merge pull request #52793 from nikhita/crd-validation-conversion-tests
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>.

apiextensions: add round trip tests for CRD schema conversion

Follow up test for https://github.com/kubernetes/kubernetes/pull/52281.

Need to update go-openapi to get this - https://github.com/go-openapi/spec/pull/31 - in.

**Special notes for your reviewer**: The tests won't pass until https://github.com/kubernetes/kubernetes/pull/52281 is merged.

**Release note**:

```release-note
NONE
```

/cc @sttts

Kubernetes-commit: e339400f6f269b9071241b1c0b5f3e7f76bcf994
2017-10-16 06:29:03 +00:00
Kubernetes Publisher
dda0d75735 Merge pull request #49654 from jcbsmpsn/move-certificate-manager
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>.

Move certificate manager to client.

Fixes https://github.com/kubernetes/kubernetes/issues/53452

**What this PR does / why we need it**:
Migrate the certificate_manager to a location where it can be shared.

```release-note
NONE
```

Kubernetes-commit: f321a16af4b2a9aa6df3c2cac134cc444438040c
2017-10-16 06:28:43 +00:00
Solly Ross
22e2e0ebf1 [client-go] Add fake scale client
This adds a new fake scale client (for use in testing) to match the
new polymorphic scale client.

Kubernetes-commit: f22bfcd65acafc75235665feac3b147f16e30998
2017-10-13 17:55:53 -04:00
Jeff Grafton
c92755ea3b update BUILD files
Kubernetes-commit: aee5f457dbfd70c2d15c33e392dce6a3ca710116
2017-10-12 13:52:10 -07:00
juanvallejo
3df32f530e perform nil check before iterating over keys
Kubernetes-commit: 1fcd410d4ae9b8dbe3cf5d340582f078abc7b2b4
2017-10-12 16:25:31 -04:00
Solly Ross
bb89f2cbb8 [client-go] Polymorphic Scale Client
This introduces a polymorphic scale client capable of operating against
scale subresources which return different group-versions of Scale.  The
scale subresources may be in group-versions different than the scale
itself, so that we no longer need a copy of every scalable resource in
the extensions API group.

To discovery which Scale group-versions go to which subresources,
discovery is used.

The scale client maintains its own internal versions and conversions to
several external versions, with a "hub" version that's a copy of the
autoscaling internal version.

It currently supports the following group-versions for Scale subresources:

- extensions/v1beta1.Scale
- autoscaling/v1.Scale

Kubernetes-commit: d61a2d90372c301dd11088df8941acf2bb01c38c
2017-10-11 14:23:48 -04:00
Solly Ross
5e8cd580d2 [client-go] fake discovery returns server groups
The fake discovery client currently returns `nil, nil` for several
methods.  Among them is the `ServerGroups` method, which is used by the
discovery REST mapper implementations.  This updates the fake discovery
client to actually return server groups so that the discovery REST
mapper can be used in tests.

Kubernetes-commit: f83a19676c0b53b2c2240d11d58e9d35c31d9ff5
2017-10-11 14:21:29 -04:00
Clayton Coleman
1372839f29 Move pkg/kubelet/util/csr into client-go
Everything else it depends on was already there, and now we have a
somewhat consistent code chain.

Kubernetes-commit: 5649f9a578f4f130f61579d77d5609fbdaf82a1f
2017-10-10 20:15:03 -04:00
Kenneth Owens
85e068bab8 autogenerated code
Kubernetes-commit: 7c772ab2adc20d70315a938d976006bf9d390cdd
2017-10-10 14:31:00 -07:00
John Kelly
d6f3ab164c client-go: fix err scope in CRUD example
This fixes some scope isses that were introduced by shadowing vars inside anonymous functions as well as using a naked return.
Fixed by using unique err names and explicitly returning errors.
Additional improvement is using the HomeDir() util function provided by client-go instead of including a helper function at the bottom of this example.

Signed-off-by: John Kelly <jekohk@gmail.com>

Kubernetes-commit: e71c9f1b4beb06bcd3694163e6bf1764fb49edd6
2017-10-08 13:28:22 -04:00
Kubernetes Publisher
6e4f879729 Merge pull request #53202 from sttts/sttts-unify-generator-mains
Automatic merge from submit-queue (batch tested with PRs 53434, 53202). 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>.

code-generator: unify generator main funcs and prepare for launching from one binary

- remove "generated by client-gen with custom arguments" message as this does not
  make sense in the times of k8s.io/code-generator
- unify generator main funcs and explicitly call pflag.AddFlags and pflag.Parse. This
  will allow to instantiate the generators also from other places.

Requires https://github.com/kubernetes/gengo/pull/80.

Closes https://github.com/kubernetes/kubernetes/issues/53522.

Kubernetes-commit: 6ac018af01bd27054452cf04adaa05cf61f1e82a
2017-10-06 11:13:32 -07:00
Kubernetes Publisher
2cc3e12659 Merge pull request #53278 from janetkuo/ds-apps-v1-master
Automatic merge from submit-queue (batch tested with PRs 53278, 53184). 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 API version apps/v1, and bump DaemonSet to apps/v1

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

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: kubernetes/features#484

**Special notes for your reviewer**: This PR targets `master`, as a backup if #53223 (targeting features branch) falls through

@kubernetes/sig-apps-api-reviews

**Release note**:

```release-note
Add API version apps/v1, and bump DaemonSet to apps/v1
```

Kubernetes-commit: fc81ec01e51e6bcda6ed96f0f73799b43634d8d1
2017-10-16 06:28:43 +00:00
Kubernetes Publisher
0176ee01a7 Merge pull request #52512 from apelisse/truncate-body
Automatic merge from submit-queue (batch tested with PRs 53135, 52512, 48339). 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>.

client-go: Truncate printed body based on Verbosity level

**What this PR does / why we need it**: If log verbosity is above 8, it will print the full request and response body. These might be very big (especially when downloading the openapi), and it takes multiple seconds just to print it ... Truncates the printing of that body if the level is less than 10.

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: Vaguely related to #52089

**Special notes for your reviewer**:

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

Kubernetes-commit: 413cf643f946e72be9a869833ebbeda996a440cf
2017-10-16 06:28:23 +00:00
Kubernetes Publisher
8d1bb259cc Merge pull request #50555 from atlassian/fix-error-handling-from-index-funcs
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>.

threadSafeMap: panic if index function call fails

**Which issue this PR fixes**
Fixes #43605

**Release note**:
```release-note
NONE
```
/kind bug
/sig api-machinery

Kubernetes-commit: e7518d8aa3abf295c7af920f7d8a97fbd6c1537d
2017-10-16 06:28:22 +00:00
Kubernetes Publisher
a6c294a7f3 Merge pull request #49705 from atlassian/rbuf
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>.

Ring buffer for shared informer notifications

**What this PR does / why we need it**:
Improves memory allocation for shared informer listeners. Instead of always appending to the slice use as a ring buffer, avoiding reslice operations as long as there is room in the slice. See https://github.com/kubernetes/kubernetes/pull/47045#issuecomment-317621259 for details. This is a follow up PR for #47045.

Results from BenchmarkListener:
```
Current code (from the #47045):
1000000	      1540 ns/op	     109 B/op	       1 allocs/op
```
```
New code:
1000000	      1162 ns/op	      16 B/op	       1 allocs/op
```

**Special notes for your reviewer**:
Only review the last commit, this branch is based on #47045 PR. I'll rebase onto master once it is merged.

**Release note**:

```release-note
NONE
```
/kind enhancement
/sig api-machinery
/cc @deads2k @ncdc

Kubernetes-commit: bb035a2854e690d726ece2f8c5e1b8f4b7aef930
2017-10-16 06:28:22 +00:00