Commit Graph

236 Commits

Author SHA1 Message Date
Andi Li 06989d7897 Update documentation.
Minor cleanup and change default fail policy and timeout on webhook
config.
2020-08-28 12:06:28 -04:00
Andi Li 42b6b374cf Add phase 1 of validation tightening.
https://github.com/kubernetes/enhancements/blob/master/keps/sig-storage/177-volume-snapshot/tighten-validation-webhook-crd.md

1. Ratcheting validation webhook server image
2. Controller labels invalid objects
3. Unit tests for webhook
4. Deployment README and example deployment method with certs
5. Update top-level README

Racheting validation:
1. webhook is strict on create
2. webhook is strict on updates where the existing object passes strict validation
3. webhook is relaxed on updates where the existing object fails strict validation (allows finalizer removal, status update, deletion, etc)

Additionally the validating wehook server will perform immutability
checks on scenario 2 above.
2020-08-27 20:34:21 -04:00
Kubernetes Prow Robot a69711cec2 Merge pull request #307 from Kartik494/updategomod
Added go modules for Apis and Client
2020-08-19 21:45:22 -07:00
xing-yang 2a990923fd Emit event even if status update fails so user can see it 2020-08-09 04:16:16 +00:00
kartik494 ae215218d1 Added go modules for Apis and Client 2020-07-29 16:52:45 +05:30
Christian Huffman ffaeac1515 Move to klogv2 2020-07-27 14:39:56 -04:00
Christian Huffman d392f5c22a Adjusted the date printing to address unit test failure 2020-07-24 10:29:23 -04:00
Kubernetes Prow Robot 3c32e2887b Merge pull request #334 from makkes/remove-kubernetes-dep
chore: get rid of k8s.io/kubernetes dep
2020-07-23 23:36:22 -07:00
Saikat Roychowdhury 73697eba81 Call dynamic VS content creation unconditionally
Irrespective of any error on the Volume Snapshot
object, initiate dynamic VolumeSnapshotContent object
creation. If any required parameters are not found, (e.g. missing
VS class), the VS content object creation would fail gracefully.
2020-07-23 15:14:16 +00:00
Max Jonas Werner 04848c755a chore: remove unused parameter from util funcs; add unit test
Added the unit tests from
https://github.com/kubernetes/kubernetes/blob/master/pkg/util/slice/slice_test.go
(minus modifier tests) so we can be sure to not change behaviour.
2020-07-22 09:36:22 +02:00
Kubernetes Prow Robot 0c5b535d88 Merge pull request #284 from xing-yang/error_status
Update Error in Snapshot Status
2020-07-21 22:46:05 -07:00
xing-yang 5f2090606c Update Error in Snapshot Status 2020-07-22 04:46:35 +00:00
Max Jonas Werner 1f13709413 chore: get rid of k8s.io/kubernetes dep
This dependency is problematic because of the many replaces it brings
with it. This makes it hard to import external-snapshotter in 3rd
party projects without having a lot of `replace` directives in those
projects as well.

The only usage of that import was to get two very simple utility
functions so I copied them over to this repo.
2020-07-21 18:23:38 +02:00
xing-yang 5800df6a61 Fix requeue logic in the common controller 2020-06-25 03:37:40 +00:00
Christian Huffman daf0051f2b Updated sidecar to not require VolumeSnapshotClass for snapshot deletion 2020-06-04 17:16:45 -04:00
Kubernetes Prow Robot 63029d9db4 Merge pull request #280 from yuxiangqian/metrics
add metric to common controller - basic metrics utilities
2020-05-26 14:08:41 -07:00
xiangqian 7bd717198b add basic metrics utility functions
relax latency check to be greater than instead of within threshold
2020-05-21 13:45:44 -07:00
xing-yang cbd5b8b7a1 Add requeue in sidecar 2020-05-09 21:36:16 +00:00
Humble Chirammal dcd7162224 Remove unwanted code conditions
Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
2020-05-04 20:57:54 +05:30
Kubernetes Prow Robot 859696c419 Merge pull request #286 from humblec/dep-update
Update kube vendor dependency and others
2020-05-04 05:52:26 -07:00
Humble Chirammal b72230379f update kube and vendor dependencies
With kubernetes 1.18 release of client-go, signatures on methods in
generated clientsets, dynamic, metadata, and scale clients have been
modified to accept context.Context as a first argument.
Signatures of Create, Update, and Patch methods have been updated
to accept CreateOptions, UpdateOptions and PatchOptions respectively.
Signatures of Delete and DeleteCollection methods now accept
DeleteOptions by value instead of by reference.
These changes are now accommodated with this PR and client-go
and dependencies are updated to v1.18.0

Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
2020-05-03 21:52:48 +05:30
zhucan 1ee21c1de5 Add event for snapshotting in progress
Signed-off-by: zhuc <zhucan@xsky.com>
2020-04-30 10:26:27 +08:00
ialidzhikov d1330389c5 Nit: fix typos
Signed-off-by: ialidzhikov <i.alidjikov@gmail.com>
2020-04-26 23:43:15 +03:00
xiangqian 45324b7a67 revamp find content logic to fix 290 291 292
add snapshot source validation in syncSnapshot
add content source validation in syncContent
2020-04-20 21:29:30 -07:00
xing-yang f688d7baef Remove error status check 2020-04-03 18:34:57 +00:00
xing-yang 2295e6aea3 Add error status check in createSnapshotWrapper 2020-04-03 01:53:04 +00:00
xing-yang 9f382acd43 Address review comments 2020-04-02 14:23:08 +00:00
xing-yang f32313bdb8 checkandUpdateContentStatusOperation should not call createSnapshotOperation 2020-04-02 14:23:08 +00:00
xing-yang 0189c77f5a Check final error 2020-04-02 14:23:08 +00:00
xing-yang 6ca7507bc3 Address review comments 2020-04-02 14:23:08 +00:00
xing-yang 7930dd261d Check error code DeadlineExceeded 2020-04-02 14:23:08 +00:00
xing-yang aa2bc2fb9c Remove the unnecessary driver name check 2020-04-02 14:23:08 +00:00
xing-yang 4c38cc8c6e Remove VolumeSnapshotBeingCreated annotation after driver response 2020-04-02 14:23:08 +00:00
xing-yang 313507f866 Add AnnVolumeSnapshotBeingCreated 2020-04-02 14:23:08 +00:00
xing-yang c82c8e0c7e Add a check to see if PVC has a finalizer 2020-04-02 02:01:52 +00:00
xing-yang 8ae4d0c278 Check if PVC is being used by a snapshot as source 2020-04-02 01:50:19 +00:00
Christian Huffman 25b65ea8a8 Moving nil check to correct location 2020-03-19 16:21:46 -04:00
Kubernetes Prow Robot ac3ef99c2d Merge pull request #275 from huffmanca/update_snapshotclass_deletion
Allows VolumeSnapshot to be deleted if the class isn't found
2020-03-18 17:12:43 -07:00
Christian Huffman 91a55c0e13 Allows VolumeSnapshot to be deleted if the class isn't found 2020-03-18 16:54:59 -04:00
Christian Huffman 806ccc0b29 Include a nil check for the snapshotContent 2020-03-18 13:35:25 -04:00
Grant Griffiths fe1c355fa9 Add more sidecar tests and cleanup sidecar code
Signed-off-by: Grant Griffiths <grant@portworx.com>
2020-03-04 20:30:45 -08:00
Grant Griffiths 9830b6ec23 Fix error check for checkandAddSnapshotFinalizers and add tests
Signed-off-by: Grant Griffiths <grant@portworx.com>
2020-03-04 10:48:16 -08:00
xing-yang b154cc77e7 Add VolumeSnapshotBeingDeleted annotation to content 2020-02-28 18:10:20 +00:00
Christian Huffman c3beea55ba Update CRDs to include additional get information 2020-02-27 09:52:36 -05:00
Kubernetes Prow Robot 883842f48f Merge pull request #252 from bells17/add-feature-listsnapshots-secrets2
Added the feature to use secrets of ListSnapshots
2020-02-20 18:28:32 -08:00
bells17 3c2baf4e96 Add comments 2020-02-21 00:44:44 +09:00
bells17 7cbcf6aa41 Fix log messages and error messages 2020-02-21 00:42:15 +09:00
bells17 8e9680affd Modify to upper case variable name from lower case for unit tests 2020-02-20 23:13:12 +09:00
bells17 dd390a3e38 Improve error messages 2020-02-20 01:09:40 +09:00
bells17 0a1579d0f2 Add support for list secret parameters to RemovePrefixedParameters 2020-02-20 01:00:22 +09:00