kubernetes-csi / external-snapshotter

Sidecar container that watches Kubernetes Snapshot CRD objects and triggers CreateSnapshot/DeleteSnapshot against a CSI endpoint.
Apache License 2.0
490 stars 370 forks source link

Add nil check for SourceVolumeMode in the ValidationWebHook #1006

Closed xing-yang closed 8 months ago

xing-yang commented 8 months ago

(cherry picked from commit 36738cd8bc99a39149db514ea95f1e317d119546)

What type of PR is this? /kind bug

What this PR does / why we need it:

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

Cherry-pick from PR [#1005](https://github.com/kubernetes-csi/external-snapshotter/pull/1005). Fixes a panic in the snapshot validation webhook.
RaunakShah commented 8 months ago

/approve /lgtm

k8s-ci-robot commented 8 months ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: RaunakShah, xing-yang

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files: - ~~[OWNERS](https://github.com/kubernetes-csi/external-snapshotter/blob/release-7.0/OWNERS)~~ [xing-yang] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment