-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Check whether the volume is provisioned by CSI driver or not by the annotation as well #4513
Conversation
9fa2c54
to
0eda7a3
Compare
@@ -103,7 +103,7 @@ local_resource( | |||
|
|||
local_resource( | |||
"restic_binary", | |||
cmd = 'cd ' + '.' + ';mkdir -p _tiltbuild/restic; BIN=velero GOOS=' + local_goos + ' GOARCH=amd64 RESTIC_VERSION=0.12.0 OUTPUT_DIR=_tiltbuild/restic ./hack/download-restic.sh', | |||
cmd = 'cd ' + '.' + ';mkdir -p _tiltbuild/restic; BIN=velero GOOS=linux GOARCH=amd64 RESTIC_VERSION=0.12.0 OUTPUT_DIR=_tiltbuild/restic ./hack/download-restic.sh', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there any difference after modifying the GOOS setting for the Tiltfile?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
pkg/util/kube/utils.go
Outdated
// Although the pv.Spec.CSI is nil, the volume could be provisioned by a CSI driver when enabling the CSI migration | ||
// Refer to https://github.com/vmware-tanzu/velero/issues/4496 for more details | ||
if pv.Annotations != nil { | ||
if strings.Contains(pv.Annotations[KubeAnnDynamicallyProvisioned], "csi") { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for safety how about checking .csi.
?
Can we add a log saying because the provisioned-by annotation is xxxx so I think this is provisioned by CSI
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are some drivers named csi.xxx
and csi-xxx
: https://kubernetes-csi.github.io/docs/drivers.html
7a7d884
to
634bb0e
Compare
…nnotation as well Check whether the volume is provisioned by CSI driver or not by the annotation as well Fixes vmware-tanzu#4496 Signed-off-by: Wenkai Yin(尹文开) <yinw@vmware.com>
634bb0e
to
fcad46c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
Check whether the volume is provisioned by CSI driver or not by the annotation as well
Fixes #4496
Signed-off-by: Wenkai Yin(尹文开) yinw@vmware.com
Thank you for contributing to Velero!
Please add a summary of your change
Does your change fix a particular issue?
Fixes #(issue)
Please indicate you've done the following:
/kind changelog-not-required
as a comment on this pull request.site/content/docs/main
.