It's ethical, the parts will be made whether you work that job or not, and you're only responsible for the actions of the military to the extent that you're able to change them.
Since none of your reasonable options will make an impact on the production or use of those items, it's not a ethical issue for you to work there.
What matters much more is your ability to provide for yourself and those around you.