If the main place of work, is aware and approves of you working the second job, and is aware it is for the other company, there is no problem. It is only a ethics issues if it is all done in secret.