Skip to content

Commit

Permalink
refactor: use uint64 for storage size
Browse files Browse the repository at this point in the history
  • Loading branch information
shreddedbacon committed Feb 23, 2024
1 parent b03c7f3 commit 7090d90
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions internal/storage/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,8 @@ type StorageClaim struct {
Environment int `json:"environment"`
PersisteStorageClaim string `json:"persistentStorageClaim"`
//it is actually kilobytes that du outputs, this should be deprecated
BytesUsed int `json:"bytesUsed"`
KiloBytesUsed int `json:"kiloBytesUsed"`
BytesUsed uint64 `json:"bytesUsed"`
KiloBytesUsed uint64 `json:"kiloBytesUsed"`
}

// Calculate will run the storage-calculator job.
Expand Down
8 changes: 4 additions & 4 deletions internal/storage/pod.go
Original file line number Diff line number Diff line change
Expand Up @@ -161,8 +161,8 @@ func (c *Calculator) createStoragePod(
storData.Claims = append(storData.Claims, StorageClaim{
Environment: environmentID,
PersisteStorageClaim: vol.Name,
BytesUsed: pBytesInt,
KiloBytesUsed: pBytesInt,
BytesUsed: uint64(pBytesInt),
KiloBytesUsed: uint64(pBytesInt),
})
}

Expand All @@ -187,8 +187,8 @@ func (c *Calculator) createStoragePod(
storData.Claims = append(storData.Claims, StorageClaim{
Environment: environmentID,
PersisteStorageClaim: "mariadb",
BytesUsed: mBytesInt,
KiloBytesUsed: mBytesInt,
BytesUsed: uint64(mBytesInt),
KiloBytesUsed: uint64(mBytesInt),
})
// and attempt to patch the namespace with the labels
mergePatch, _ := json.Marshal(map[string]interface{}{
Expand Down

0 comments on commit 7090d90

Please sign in to comment.