-
Notifications
You must be signed in to change notification settings - Fork 2
Add to import image from local #33
Conversation
Please edit dbox |
If we have no matching nodeName, the pod is pending. Is this enough? or is it an error? |
The nodeName field is enough as node selector? or could a label be used in the future? |
User guide is needed to update including explanations how to import a local vm image file. This PR's description is also needed to update with using cat and kubectl with WriteBlockPath instead of stagingPath. |
metadata: | ||
name: example-localuploadproxy | ||
spec: | ||
nodeName: young |
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.
Please use more general name
the 'kubectl exec' command can run any kubernetes node. If so, do we need to specify the node? |
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.
Need English translation for following lines:
kubevirt-image-service/pkg/controller/virtualmachineimage/virtualmachineimage_controller.go
Line 100 in c7eba64
// pvc가 없으면 상태를 업데이트하고 pvc를 생성한다. |
kubevirt-image-service/pkg/controller/virtualmachineimage/virtualmachineimage_controller.go
Line 104 in c7eba64
// imported=false인 경우 스크래치 pvc를 생성한다. |
kubevirt-image-service/pkg/controller/virtualmachineimage/virtualmachineimage_controller.go
Line 108 in c7eba64
// imported=false인 경우 임포터파드가 없으면 만든다. 있으면 컴플리트인지 확인해서 imported=true로 변경한다. |
kubevirt-image-service/pkg/controller/virtualmachineimage/virtualmachineimage_controller.go
Line 112 in c7eba64
// imported=true인 경우 스냅샷이 없으면 만들고, readyToUse를 true로 변경한다. |
ded77a8
to
0252c5f
Compare
Since it is not related to this pull request, I will modify it in another pull request. #38 |
b30eb8b
to
7069e37
Compare
That's right. It works normally on any node, so we don't need to specify node name. |
Done |
Done |
a901fca
to
ca18dd3
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.
Ah looks like we need to consider how to create VMV for local uploaded VMIM.
f2114b2
to
eed9bb8
Compare
pkg/controller/virtualmachineimage/virtualmachineimage_controller.go
Outdated
Show resolved
Hide resolved
78776bc
to
9cac1db
Compare
deploy/crds/hypercloud.tmaxanc.com_v1alpha1_virtualmachineimage_volume_cr.yaml
Outdated
Show resolved
Hide resolved
} else if src == sourceTypeVolume { | ||
// check node name is not empty when source is hostPath volume | ||
if r.vmi.Spec.Source.Volume.HostPath != nil && r.vmi.Spec.NodeName == "" { | ||
return goerrors.New("when the source is hostPath volume, the node name must not be empty") |
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.
If we just return error, how to the user figure out the vmim is in error state? we can see the error logs but there's no error message in vmim.
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.
user can check the error state through kubectl get vmim
and the error message through kubectl describe vmim
.
$ kubectl get vmim
NAME STATE
localvmim Error
$ kubectl describe vmim
Status:
Conditions:
Last Transition Time: 2020-09-18T01:16:24Z
Message: no source set for vmim
Reason: SeeMessages
Status: False
Type: ReadyToUse
State: Error
Isn't that enough?
pkg/controller/virtualmachineimage/virtualmachineimage_controller.go
Outdated
Show resolved
Hide resolved
6195349
to
016d70e
Compare
pkg/controller/virtualmachineimage/virtualmachineimage_controller.go
Outdated
Show resolved
Hide resolved
9bc2e66
to
70a2e00
Compare
LGTM |
LGTM overall except a few issues |
f0ff9be
to
0455141
Compare
lgtm |
pkg/controller/virtualmachineimage/virtualmachineimage_controller.go
Outdated
Show resolved
Hide resolved
- add hostpath source to vmim - user can use hostpath source to import local image
LGTM |
User can import a local image using
hostPath
source. User should create qcow2 file ofdisk.img
in specific path and create vmim using that host path.VirtualMachineImageHostPath.yaml