kubernetes/pkg/controller/volume/persistentvolume
Kubernetes Submit Queue b758341a04
Merge pull request #62646 from cofyc/reporteventtoapiserver
Automatic merge from submit-queue (batch tested with PRs 62694, 62569, 62646, 61633, 62433). 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>.

Report events to apiserver in local volume plugin.

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

See https://github.com/kubernetes/kubernetes/pull/62102#discussion_r179238429.

Report events to apiserver in local volume plugin.

- Add VolumeHost.GetEventRecorder() method
- Add related e2e tests

**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 #62248

**Special notes for your reviewer**:

Example output of `kubectl describe pods`:

```
Events:
  Type     Reason                 Age   From                Message
  ----     ------                 ----  ----                -------
  Normal   Scheduled              7s    default-scheduler   Successfully assigned e2e-tests-persistent-local-volumes-test-x4h5x/security-context-670da435-4174-11e8-9098-000c29bb0377 to 127.0.0.1
  Warning  AlreadyMountedVolume   7s    kubelet, 127.0.0.1  The requested fsGroup is 4321, but the volume local-pvfbb76 has GID 1234. The volume may not be shareable.
  Normal   SuccessfulMountVolume  7s    kubelet, 127.0.0.1  MountVolume.SetUp succeeded for volume "default-token-996xr"
  Normal   SuccessfulMountVolume  7s    kubelet, 127.0.0.1  MountVolume.SetUp succeeded for volume "local-pvfbb76"
  Normal   Pulled                 6s    kubelet, 127.0.0.1  Container image "k8s.gcr.io/busybox:1.24" already present on machine
  Normal   Created                6s    kubelet, 127.0.0.1  Created container
  Normal   Started                6s    kubelet, 127.0.0.1  Started container
```

**Release note**:

```release-note
NONE
```
2018-04-18 14:44:17 -07:00
..
metrics add number measurement for bound/unbound pv/pvc 2018-02-14 17:31:14 +08:00
options update BUILD files 2017-10-15 18:18:13 -07:00
binder_test.go Add binding error message for volumeMode:Block unsupported case 2018-04-16 15:22:35 -04:00
BUILD update bazel 2018-02-27 20:23:36 +08:00
delete_test.go Pass pod informer to PV controller 2018-02-05 15:40:25 +01:00
framework_test.go update import 2018-02-27 20:23:35 +08:00
index.go update import 2018-02-27 20:23:35 +08:00
index_test.go update import 2018-02-27 20:23:35 +08:00
OWNERS Add msau42 to approvers for volume scheduling 2018-04-12 11:09:28 -07:00
provision_test.go fix all the typos across the project 2018-02-11 11:04:14 +08:00
pv_controller.go Merge pull request #59947 from mkimuram/issue/59942 2018-04-17 16:31:21 -07:00
pv_controller_base.go Use typed events client directly 2018-04-01 18:57:29 +10:00
pv_controller_test.go In findMatchingVolumes: 2017-11-21 21:42:35 -08:00
recycle_test.go Don't recycle PVs that are used by a pod 2018-02-05 16:41:39 +01:00
scheduler_assume_cache.go Index PVs by StorageClass in assume cache 2018-02-15 17:12:32 -08:00
scheduler_assume_cache_test.go Index PVs by StorageClass in assume cache 2018-02-15 17:12:32 -08:00
scheduler_binder.go Use provided node object in volume binding predicate 2018-04-05 14:35:55 -07:00
scheduler_binder_cache.go Cache for pod bindings 2017-11-21 21:42:36 -08:00
scheduler_binder_cache_test.go fix all the typos across the project 2018-02-11 11:04:14 +08:00
scheduler_binder_fake.go Use provided node object in volume binding predicate 2018-04-05 14:35:55 -07:00
scheduler_binder_test.go clean unused function 2018-04-10 10:15:14 +08:00
volume_host.go Report events to apiserver in local volume plugin. 2018-04-18 11:19:36 +08:00