uselagoon/remote-controller

Robot Account Creation Fails With Certain Environment Names on Harbor v2.2.0+

Closed this issue · 0 comments

Harbor v2.2.0 introduced a name verification for robot accounts with goharbor/harbor#13685.

The name created in

robotName := fmt.Sprintf("%s-%s", environmentName, helpers.HashString(h.LagoonTargetName)[0:8])
can be invalid when an environment name contains consecutive dashes, a trailing dash or it doesn't conform to the regex in other ways.