mirror of
https://github.com/fluxcd/flux2.git
synced 2026-05-23 01:45:53 +00:00
fix: preserve invalid label type
Signed-off-by: Raffael Sahli <raffael.sahli@doodle.com>
This commit is contained in:
parent
f75d52d5c6
commit
b780fdfaee
1 changed files with 2 additions and 9 deletions
|
|
@ -659,17 +659,10 @@ func kustomizationsEqual(k1 *kustomizev1.Kustomization, k2 *kustomizev1.Kustomiz
|
|||
}
|
||||
|
||||
func (b *Builder) setOwnerLabels(res *resource.Resource) error {
|
||||
labels := res.GetLabels()
|
||||
|
||||
labels[controllerGroup+"/name"] = b.kustomization.GetName()
|
||||
labels[controllerGroup+"/namespace"] = b.kustomization.GetNamespace()
|
||||
|
||||
err := res.SetLabels(labels)
|
||||
if err != nil {
|
||||
if err := res.PipeE(yaml.SetLabel(controllerGroup+"/name", b.kustomization.GetName())); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
return res.PipeE(yaml.SetLabel(controllerGroup+"/namespace", b.kustomization.GetNamespace()))
|
||||
}
|
||||
|
||||
func maskSopsData(res *resource.Resource) error {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue