Take advantage of CNAMEs for namenode and resourcemanager

Change-Id: Ib44cb2fb12c8585d1a38eb8f33bc85a4a648c872