Merge pull request #1048 from Liujingfang1/transformer

fix the bug for setting annotations when triggering transformers
This commit is contained in:
Kubernetes Prow Robot
2019-05-07 17:14:34 -07:00
committed by GitHub
2 changed files with 25 additions and 4 deletions

View File

@@ -208,12 +208,10 @@ func (p *ExecPlugin) getResMapWithIdAnnotation(rm resmap.ResMap) (resmap.ResMap,
}
annotations := r.GetAnnotations()
if annotations == nil {
annotations = map[string]string{
idAnnotation: string(idString),
}
r.SetAnnotations(annotations)
annotations = make(map[string]string)
}
annotations[idAnnotation] = string(idString)
r.SetAnnotations(annotations)
}
return inputRM, nil
}