diff --git a/pkg/gitops/environment_declaration.go b/pkg/gitops/environment_declaration.go index 50fbe118..78db8375 100644 --- a/pkg/gitops/environment_declaration.go +++ b/pkg/gitops/environment_declaration.go @@ -33,7 +33,8 @@ import ( // digests the same at both ends. Solution units are not among them. func serviceUnitNames(units []InventoryUnit) []string { var names []string - for _, unit := range units { + for i := range units { + unit := &units[i] if unit.Kind == UnitKindService && unit.Name != "" { names = append(names, unit.Name) }