public static HasMetadata mergeResources ( HasMetadata item1 , HasMetadata item2 , Logger log , boolean switchOnLocalCustomisation ) { if ( item1 instanceof Deployment && item2 instanceof Deployment ) { return mergeDeployments ( ( Deployment ) item1 , ( Deployment ) item2 , log , switchOnLocalCustomisation ) ; } if ( item1 instanceof ConfigMap && item2 instanceof ConfigMap ) { ConfigMap cm1 = ( ConfigMap ) item1 ; ConfigMap cm2 = ( ConfigMap ) item2 ; return mergeConfigMaps ( cm1 , cm2 , log , switchOnLocalCustomisation ) ; } mergeMetadata ( item1 , item2 ) ; return item1 ; }
Merges the given resources together into a single resource .