Skip to content

Commit

Permalink
CSI vols can be sticky too
Browse files Browse the repository at this point in the history
  • Loading branch information
pkazmierczak committed Dec 5, 2024
1 parent bf18d1f commit 7ddcb3d
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 17 deletions.
4 changes: 0 additions & 4 deletions nomad/structs/volumes.go
Original file line number Diff line number Diff line change
Expand Up @@ -168,10 +168,6 @@ func (v *VolumeRequest) Validate(jobType string, taskGroupCount, canaries int) e
}

case VolumeTypeCSI:
if v.Sticky {
addErr("CSI volumes cannot be set to sticky")
}

switch v.AttachmentMode {
case CSIVolumeAttachmentModeUnknown:
addErr("CSI volumes must have an attachment mode")
Expand Down
13 changes: 0 additions & 13 deletions nomad/structs/volumes_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,19 +85,6 @@ func TestVolumeRequest_Validate(t *testing.T) {
PerAlloc: true,
},
},
{
name: "Sticky CSI",
expected: []string{
"CSI volumes cannot be set to sticky",
},
req: &VolumeRequest{
Source: "source",
Type: VolumeTypeCSI,
Sticky: true,
AttachmentMode: CSIVolumeAttachmentModeBlockDevice,
AccessMode: CSIVolumeAccessModeMultiNodeMultiWriter,
},
},
}

for _, tc := range testCases {
Expand Down

0 comments on commit 7ddcb3d

Please sign in to comment.