Commit Graph

84 Commits

Author SHA1 Message Date
Andrew Kim 06a4bf2a05 refactor external snapshotter to use csi-lib-utils/rpc 2019-04-01 14:40:11 -04:00
Hakan Memisoglu 2fcfc8be28 Improve the logs 2019-03-27 19:48:25 -07:00
Hakan Memisoglu d6c5d512c6 Add test for prebound case 2019-03-27 19:42:46 -07:00
Hakan Memisoglu c424e68cef Fix for pre-bound snapshot empty source error 2019-03-27 19:37:28 -07:00
Humble Chirammal eb2dd437c1 Migrate to k8s.io/klog from glog.
Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
2019-03-26 19:10:24 +05:30
Michelle Au 08e735383b Use events V1 API 2019-03-11 11:17:00 -07:00
Andrew Kim 0da03b3210 external-snapshotter should use CSI connection lib 2019-02-13 22:42:05 -05:00
Patrick Ohly 054c612f6b release tools
This synchronizes the build rules with other repos and (as part of
that) bumps the Go version to 1.11.1. The recommended formatting
changed slightly in that Go version.
2019-01-24 17:30:10 +01:00
Kubernetes Prow Robot a7c6dec2ac Merge pull request #81 from humblec/clean
Correct error variables and fix other golint errors.
2019-01-06 06:13:53 -08:00
Kubernetes Prow Robot 7d3b3ec1af Merge pull request #82 from humblec/clean-2
Update exported function details with source code comments.
2019-01-06 06:12:18 -08:00
Humble Chirammal 546cafabdc Remove redundant else blocks
Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
2019-01-06 19:23:42 +05:30
Humble Chirammal 164d10a824 Update exported function details with source code comments.
Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
2019-01-06 19:09:51 +05:30
Humble Chirammal 6a4dfa47e5 Fix error formatting in snapshot controller.
Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
2019-01-06 14:53:24 +05:30
Humble Chirammal 0e4d11b0fb Correct error variables and fix other golint errors.
Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
2019-01-06 14:31:02 +05:30
Kubernetes Prow Robot 9708a1b090 Merge pull request #75 from wackxu/pvclister
add pvcLister to snapshot controller
2019-01-02 07:17:24 -08:00
Kubernetes Prow Robot 1e1a432d5e Merge pull request #78 from xing-yang/csi_secret
Add new reserved prefixed parameter keys
2018-12-04 00:52:54 -08:00
Xing Yang 0cf36adb91 Add new reserved prefixed parameter keys
This PR adds new reserved prefixed parameter keys which are stripped
out of parameter list, and adds deprecation notice for old keys and
keep their behavior the same.

```
csiParameterPrefix = "csi.storage.k8s.io/"
prefixedSnapshotterSecretNameKey      = csiParameterPrefix + "snapshotter-secret-name"
prefixedSnapshotterSecretNamespaceKey = csiParameterPrefix + "snapshotter-secret-namespace"
```
2018-12-03 17:38:53 -08:00
Michelle Au 097a4b897c use protosanitizer library 2018-11-30 13:29:40 -08:00
xushiwei 85504e1220 add pvcLister to snapshot controller
This reverts commit 96b6f495d3.
2018-11-30 17:19:47 +08:00
Xing Yang 96b6f495d3 Revert "add pvcLister to snapshot controller" 2018-11-27 19:38:09 -05:00
k8s-ci-robot a40dc65b96 Merge pull request #72 from wackxu/pvclister
add pvcLister to snapshot controller
2018-11-27 11:58:37 -08:00
Xing Yang ea17039454 Add Finalizer for VolumeSnapshot/VolumeSnapshotContent
This PR adds a Finalizer for VolumeSnapshotContent.
If the VolumeSnapshotContent is bound to a VolumeSnapshot,
the VolumeSnapshotContent is being used and cannot be
deleted.
This PR also adds a Finalizer for VolumeSnapshot.
If a volume is being created from the snapshot,
the VolumeSnapshot is being used and cannot be deleted.
2018-11-27 10:35:44 -08:00
xushiwei e4997e5fb8 add pvcLister to snapshot controller 2018-11-27 21:43:09 +08:00
Xing Yang bfba4cba0f Rename Ready to ReadyToUse
This PR renames Ready to ReadyToUse in VolumeSnapshot Status
to be consistent with the name in CSI spec.
2018-11-26 19:21:43 -08:00
k8s-ci-robot 2840dd887f Merge pull request #50 from wackxu/patch-1
fix WaitForCacheSync and initializeCaches bug
2018-11-20 11:25:55 -08:00
xushiwei 89a64c9b92 fix fail UT 2018-11-20 20:54:07 +08:00
Jing Xu 96e3bd1818 Add volumesnapshot content deletion policy
This PR adds DeletionPolicy which describes a policy for end-of-life maintenance of volume snapshot contents.
There are two types of policies, delete and retain. By default, the
policy is delete. In this case, when volume snaphsot is deleted, the
volume snapshot content for it should be deleted, as well as the
physical snapshot. If the policy is set the retain, the volume snapshot
content will remain even if the volume snapshot it binds to is deleted.
2018-11-19 17:15:07 -08:00
Jing Xu 7a374a3838 Generated files
This comment includes the generated file changes.
2018-11-19 17:04:42 -08:00
Xing Yang fddc5547f3 Use existing content name
If content name is already in snapshot object, just use it.
This may be the case for static provisioning. Otherwise construct
new name for content for dynamic provisioning.
2018-11-19 15:20:57 -08:00
k8s-ci-robot 799fb952e1 Merge pull request #61 from xing-yang/csi_snapshot_status
Call CreateSnapshot to check if snapshot is processed
2018-11-19 15:07:28 -08:00
Xing Yang c01fb649f2 Call CreateSnapshot to check if snapshot is processed
This PR calls CreateSnapshot to check if the snapshot post-cut
processing (uploading) is complete and update status accordingly.
2018-11-19 13:02:21 -08:00
Cheng Xing 06b4d4ec0d Updating generated API clients 2018-11-16 14:30:00 -08:00
Michelle Au 0decedb0fa Update unit tests and disable broken status unit tests 2018-11-14 16:54:28 -08:00
Michelle Au 83c8c05a4a Update snapshotter to use CSI spec 1.0. This breaks the snapshot handling of error and uploading status 2018-11-14 16:54:28 -08:00
Michelle Au 92f87c14e7 Update csi/v0 import to csi/ 2018-11-14 13:25:09 -08:00
xushiwei 69335b15e7 fix some comment typo 2018-11-02 17:09:55 +08:00
xushiwei a32313cccb fix initializeCaches bug 2018-11-02 14:54:48 +08:00
XsWack 7fdc9ddbbe Add classListerSynced for WaitForCacheSync 2018-11-02 14:54:48 +08:00
Xing Yang c422fbde7c Switch to use TypedLocalObjectReference in core API 2018-10-17 10:38:17 -07:00
Xing Yang 58f71bef8c Update snapshot class in the content spec
This PR sets the snapshot class and UID in the volume snapshot
content spec if one of them is not set. This is to make sure
that snapshot class is set in the content in the case of
static binding.
2018-09-24 12:40:01 -07:00
Jing Xu c401b2331c Handle the CSI driver in VolumeSnapshotContent does not match case
In VolumeSnapshotContent, if the CSI driver does not match the plugin's,
the controller should skip this content instead of always processing it.
This PR also add a few tests related to snapshot and content static
binding.

During binding, if content specify its bound snapshot uid and it
does not match the snapshot's uid, the content object and also the
physical snapshot will be deleted. In this case, the controller will
treat the content as an orphan content because its snapshot object does
not exist (deleted) any more.
2018-09-20 15:21:18 -07:00
Jing Xu daaee085e5 Fix restore size type in snapshot content
Change the restore size to int64 for snapshot content. Also add the code
to update the restore size for snapshot content.
2018-09-18 12:26:18 -07:00
k8s-ci-robot 631b9dc996 Merge pull request #20 from wackxu/clean
snapshot api types fix
2018-09-14 14:23:38 -07:00
Xing Yang 8f65bb7f16 Merge pull request #25 from jingxu97/eventscheme
Add event scheme
2018-09-13 14:54:41 -04:00
Jing Xu 2141247565 Add event scheme
This PR adds the event scheme
2018-09-13 11:37:06 -07:00
Jing Xu a6748068dd Fix updating restore size issue
This PR fixed the issue of not updating the snapshot restore size after
snapshot is created. Before snapshot is ready, the returned size might
not be accurate. So we need to keep updating the snapshot size during
checking the snapshot status.
2018-09-07 10:07:59 -07:00
xushiwei 00425595 ae2be6651e remove class store since we donot update it in controller 2018-09-06 11:08:58 +08:00
xushiwei 00425595 b5dff7f72f snapshot api types cleanup 2018-09-06 09:48:41 +08:00
xushiwei 00425595 1f497d324f address comments 2018-09-03 21:05:06 +08:00
wackxu 8d2504ad9c add UT for snapshot controller 2018-08-30 21:32:24 +08:00