Skip to content

Commit

Permalink
stateful deployments: add corrections to API structs and methods (#24700
Browse files Browse the repository at this point in the history
)

This changeset includes changes accidentally left out from 24641.
  • Loading branch information
pkazmierczak authored and tgross committed Dec 19, 2024
1 parent fd05e46 commit 967adde
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 9 deletions.
1 change: 1 addition & 0 deletions api/tasks.go
Original file line number Diff line number Diff line change
Expand Up @@ -455,6 +455,7 @@ type VolumeRequest struct {
Type string `hcl:"type,optional"`
Source string `hcl:"source,optional"`
ReadOnly bool `hcl:"read_only,optional"`
Sticky bool `hcl:"sticky,optional"`
AccessMode string `hcl:"access_mode,optional"`
AttachmentMode string `hcl:"attachment_mode,optional"`
MountOptions *CSIMountOptions `hcl:"mount_options,block"`
Expand Down
1 change: 1 addition & 0 deletions command/agent/job_endpoint.go
Original file line number Diff line number Diff line change
Expand Up @@ -1334,6 +1334,7 @@ func ApiTgToStructsTG(job *structs.Job, taskGroup *api.TaskGroup, tg *structs.Ta
Name: v.Name,
Type: v.Type,
ReadOnly: v.ReadOnly,
Sticky: v.Sticky,
Source: v.Source,
AttachmentMode: structs.CSIVolumeAttachmentMode(v.AttachmentMode),
AccessMode: structs.CSIVolumeAccessMode(v.AccessMode),
Expand Down
6 changes: 0 additions & 6 deletions nomad/structs/diff_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8376,12 +8376,6 @@ func TestTaskDiff(t *testing.T) {
Old: "",
New: "Z",
},
{
Type: DiffTypeAdded,
Name: "Sticky",
Old: "",
New: "false",
},
{
Type: DiffTypeAdded,
Name: "Volume",
Expand Down
3 changes: 0 additions & 3 deletions nomad/structs/volumes.go
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,6 @@ type VolumeMount struct {
Volume string
Destination string
ReadOnly bool
Sticky bool
PropagationMode string
SELinuxLabel string
}
Expand All @@ -284,8 +283,6 @@ func (v *VolumeMount) Equal(o *VolumeMount) bool {
return false
case v.ReadOnly != o.ReadOnly:
return false
case v.Sticky != o.Sticky:
return false
case v.PropagationMode != o.PropagationMode:
return false
case v.SELinuxLabel != o.SELinuxLabel:
Expand Down

0 comments on commit 967adde

Please sign in to comment.