Propagation of cosmic rays and their secondaries in the intracluster medium