fix: strip length modifiers

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 untrusted user: decentral1se
GPG Key ID: 03789458B3D0C410

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,