Skip to content

Commit 0b6e44e

Browse files
authored
Merge pull request #32 from pjreed/limit-instance-label-length
Limit instance label length to 64 characters
2 parents 2bfffb9 + 0319cb7 commit 0b6e44e

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

pkg/drivers/linode/linode.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -310,6 +310,11 @@ func (d *Driver) SetConfigFromFlags(flags drivers.DriverOptions) error {
310310
d.InstanceLabel = d.GetMachineName()
311311
}
312312

313+
if len(d.InstanceLabel) > 64 {
314+
d.InstanceLabel = d.InstanceLabel[:64]
315+
log.Warnf("The name for this machine exceeds the 64 character Linode label limit. Truncating to %s", d.InstanceLabel)
316+
}
317+
313318
return nil
314319
}
315320

0 commit comments

Comments
 (0)