sed -ri ':1;/^repo[12]/,/tag/!b;/tag/!{N;b1};s/^(repo(.).*)latest$/\1newest\2/'
Do not forget about the l command for debugging, which shows what you have in the current buffer. e.g:
sed -nr ':1;/^repo[12]/,/tag/!b;/tag/!{N;b1};l;s/^(repo(.).*)latest$/\1newest\2/' file
repo1:\n replicaCount: 1\n image:\n tag: latest$
repo2:\n replicaCount: 1\n image:\n tag: latest$
Production:
sed -ri '/^repo[12]/!b;:1;/tag/!{N;b1};s/^(repo(.).*)latest$/\1newest\2/' file