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 <alexandr.zimin@flant.com>
Signed-off-by: Alexandr Stefurishin <alexandr.stefurishin@flant.com>
Co-authored-by: Alexandr Stefurishin <alexandr.stefurishin@flant.com>
Signed-off-by: Aleksandr Stefurishin <aleksandr.stefurishin@flant.com>
  • Loading branch information
2 people authored and astef committed Feb 13, 2025
1 parent c66e10c commit 3a2ab46
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 3a2ab46

Please sign in to comment.