Skip to content

Commit

Permalink
[controller] Limit the length of label values for BlockDevice resou…
Browse files Browse the repository at this point in the history
…rces to 63 symbols (#107)

Signed-off-by: Aleksandr Zimin <[email protected]>
Signed-off-by: Alexandr Stefurishin <[email protected]>
Co-authored-by: Alexandr Stefurishin <[email protected]>
  • Loading branch information
AleksZimin and Alexandr Stefurishin authored Dec 5, 2024
1 parent db6ffba commit 5627280
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions images/agent/src/internal/controller/bd/discoverer.go
Original file line number Diff line number Diff line change
Expand Up @@ -588,6 +588,8 @@ func configureBlockDeviceLabels(blockDevice v1alpha1.BlockDevice) map[string]str
}

slug.Lowercase = false
slug.MaxLength = 63
slug.EnableSmartTruncate = false
lbls[internal.MetadataNameLabelKey] = slug.Make(blockDevice.ObjectMeta.Name)
lbls[internal.HostNameLabelKey] = slug.Make(blockDevice.Status.NodeName)
lbls[internal.BlockDeviceTypeLabelKey] = slug.Make(blockDevice.Status.Type)
Expand Down

0 comments on commit 5627280

Please sign in to comment.