Skip to content

Commit dc67238

Browse files
authored
Merge pull request #700 from shawn-hurley/backport-688
Backport 688: Updating readme and webhook tempate to capture changes made for volumesnapshotclasses
2 parents 403d436 + 95ed23b commit dc67238

File tree

2 files changed

+22
-1
lines changed

2 files changed

+22
-1
lines changed

README.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,27 @@ Read more about how to install the example webhook [here](deploy/kubernetes/webh
109109

110110
* `--port`: Secure port that the webhook listens on (default 443)
111111

112+
* `--kubeconfig <path>`: Path to Kubernetes client configuration that the webhook uses to connect to Kubernetes API server. When omitted, default token provided by Kubernetes will be used. This option is useful only when the snapshot controller does not run as a Kubernetes pod, e.g. for debugging.
113+
114+
#### Validating Webhook Validations
115+
116+
##### Volume Snapshot
117+
118+
* Spec.VolumeSnapshotClassName must not be an empty string or nil on creation
119+
* Spec.Source.PersistentVolumeClaimName must not be changed on update requests
120+
* Spec.Source.VolumeSnapshotContentName must not be changed on update requests
121+
122+
##### Volume Snapshot Content
123+
124+
* Spec.VolumeSnapshotRef.Name must not be an empty string on creation
125+
* Spec.VolumeSnapshotRef.Namespace must not be an empty stringon creation
126+
* Spec.Source.VolumeHandle must not be changed on update requests
127+
* Spec.Source.SnapshotHandle must not be changed on update requests
128+
129+
##### Volume Snapshot Classes
130+
131+
* There can only be a single default volume snapshot class for a particular driver.
132+
112133
### Distributed Snapshotting
113134

114135
The distributed snapshotting feature is provided to handle snapshot operations for local volumes. To use this functionality, the snapshotter sidecar should be deployed along with the csi driver on each node so that every node manages the snapshot operations only for the volumes local to that node. This feature can be enabled by setting the following command line options to true:

deploy/kubernetes/webhook-example/admission-configuration-template

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ webhooks:
88
- apiGroups: ["snapshot.storage.k8s.io"]
99
apiVersions: ["v1", "v1beta1"]
1010
operations: ["CREATE", "UPDATE"]
11-
resources: ["volumesnapshots", "volumesnapshotcontents"]
11+
resources: ["volumesnapshots", "volumesnapshotcontents", "volumesnapshotclasses"]
1212
scope: "*"
1313
clientConfig:
1414
service:

0 commit comments

Comments
 (0)