Skip to content

Commit

Permalink
fix(cloud): Allow read-only volumes in compose
Browse files Browse the repository at this point in the history
Signed-off-by: Cezar Craciunoiu <cezar.craciunoiu@unikraft.io>
  • Loading branch information
craciunoiuc committed Dec 6, 2024
1 parent 832bb8f commit 046c922
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions internal/cli/kraft/cloud/compose/up/up.go
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,11 @@ func Up(ctx context.Context, opts *UpOptions, args ...string) error {
continue
}

volAttach := fmt.Sprintf("%s:%s", vol.UUID, volume.Target)
if volume.ReadOnly {
volAttach = fmt.Sprintf("%s:%s", volAttach, ":ro")

Check failure on line 274 in internal/cli/kraft/cloud/compose/up/up.go

View workflow job for this annotation

GitHub Actions / go

ineffectual assignment to volAttach (ineffassign)
}

volumes = append(volumes, fmt.Sprintf("%s:%s", vol.UUID, volume.Target))
}

Expand Down

0 comments on commit 046c922

Please sign in to comment.