Crystal Palace have agreed a deal to sign Bayern Munich defender Chris Richards in a deal worth an initial £8.5million.