api: Parse CSI Volumes
Previously when deserializing volumes we skipped over volumes that were not of type `host`. This commit ensures that we parse both host and csi volumes correctly.
This commit is contained in:
parent
e56c677221
commit
15c6c05ccf
|
@ -749,8 +749,9 @@ func ApiTgToStructsTG(taskGroup *api.TaskGroup, tg *structs.TaskGroup) {
|
||||||
if l := len(taskGroup.Volumes); l != 0 {
|
if l := len(taskGroup.Volumes); l != 0 {
|
||||||
tg.Volumes = make(map[string]*structs.VolumeRequest, l)
|
tg.Volumes = make(map[string]*structs.VolumeRequest, l)
|
||||||
for k, v := range taskGroup.Volumes {
|
for k, v := range taskGroup.Volumes {
|
||||||
if v.Type != structs.VolumeTypeHost {
|
if v.Type != structs.VolumeTypeHost && v.Type != structs.VolumeTypeCSI {
|
||||||
// Ignore non-host volumes in this iteration currently.
|
// Ignore volumes we don't understand in this iteration currently.
|
||||||
|
// - This is because we don't currently have a way to return errors here.
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue