Skip to content

Commit

Permalink
fix: fetchArtifacts should handle the new UBI image (#419)
Browse files Browse the repository at this point in the history
fixes #384
  • Loading branch information
harshavardhana authored Jan 13, 2021
1 parent a904a91 commit ddaf7ee
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions pkg/controller/cluster/main-controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -624,9 +624,16 @@ func (c *Controller) fetchArtifacts(tenant *miniov1.Tenant) (latest time.Time, e

// Find the file with largest size among all layers.
// This is the tar file with all minio relevant files.
maxSizeHash, _ := ls[0].Digest()
maxSize, _ := ls[0].Size()
start := 0
if len(ls) >= 2 { // skip the base layer
start = 1
}
maxSizeHash, _ := ls[start].Digest()
maxSize, _ := ls[start].Size()
for i := range ls {
if i < start {
continue
}
s, _ := ls[i].Size()
if s > maxSize {
maxSize, _ = ls[i].Size()
Expand Down

0 comments on commit ddaf7ee

Please sign in to comment.