fix: strip length modifiers
continuous-integration/drone/push Build is passing Details

See coop-cloud/organising#297.
This commit is contained in:
decentral1se 2022-03-11 16:40:10 +01:00
parent 8ccf856110
commit e9cfb076c6
Signed by: decentral1se
GPG Key ID: 03789458B3D0C410
1 changed files with 6 additions and 0 deletions

View File

@ -420,6 +420,12 @@ func convertServiceSecrets(
return nil, err
}
// NOTE(d1): strip # length=... modifiers
if strings.Contains(obj.Name, "#") {
vals := strings.Split(obj.Name, "#")
obj.Name = strings.TrimSpace(vals[0])
}
file := swarm.SecretReferenceFileTarget(obj.File)
refs = append(refs, &swarm.SecretReference{
File: &file,