@@ -180,7 +180,7 @@ func (i *InvariantInClusterDisruption) createDeploymentAndWaitToRollout(ctx cont
180180	return  nil 
181181}
182182
183- func  (i  * InvariantInClusterDisruption ) createInternalLBDeployment (ctx  context.Context , apiIntHost  string ) error  {
183+ func  (i  * InvariantInClusterDisruption ) createInternalLBDeployment (ctx  context.Context , apiIntHost ,  apiIntPort  string ) error  {
184184	deploymentObj  :=  resourceread .ReadDeploymentV1OrDie (internalLBDeploymentYaml )
185185	deploymentObj .SetNamespace (i .namespaceName )
186186	// set amount of deployment replicas to make sure it runs on all nodes 
@@ -385,26 +385,20 @@ func (i *InvariantInClusterDisruption) StartCollection(ctx context.Context, admi
385385		i .payloadImagePullSpec  =  clusterVersion .Status .History [0 ].Image 
386386	}
387387
388- 	// Check for ARO HCP  and skip if detected  
388+ 	// Check for Hypershift  and ARO HCP  
389389	oc  :=  exutil .NewCLI ("apiserver-incluster-availability" ).AsAdmin ()
390- 	var  isAROHCPcluster  bool 
391- 	isHypershift , _  :=  exutil .IsHypershift (ctx , oc .AdminConfigClient ())
392- 	if  isHypershift  {
390+ 	i .isHypershift , _  =  exutil .IsHypershift (ctx , oc .AdminConfigClient ())
391+ 	if  i .isHypershift  {
393392		_ , hcpNamespace , err  :=  exutil .GetHypershiftManagementClusterConfigAndNamespace ()
394393		if  err  !=  nil  {
395394			logrus .WithError (err ).Error ("failed to get hypershift management cluster config and namespace" )
396395		}
397396
398- 		// For Hypershift, only skip if it's specifically ARO HCP 
399- 		// Use management cluster client to check the control-plane-operator deployment 
400397		managementOC  :=  exutil .NewHypershiftManagementCLI (hcpNamespace )
401- 		if  isAROHCPcluster , err  =  exutil .IsAroHCP (ctx , hcpNamespace , managementOC .AdminKubeClient ()); err  !=  nil  {
398+ 		i .isAROHCPCluster , err  =  exutil .IsAroHCP (ctx , hcpNamespace , managementOC .AdminKubeClient ())
399+ 		if  err  !=  nil  {
402400			logrus .WithError (err ).Warning ("Failed to check if ARO HCP, assuming it's not" )
403401			i .isAROHCPCluster  =  false  // Assume not ARO HCP on error 
404- 		} else  if  isAROHCPcluster  {
405- 			i .isAROHCPCluster  =  true 
406- 		} else  {
407- 			i .isAROHCPCluster  =  false 
408402		}
409403
410404		// Check if this is a bare metal HyperShift cluster 
@@ -543,7 +537,7 @@ func (i *InvariantInClusterDisruption) StartCollection(ctx context.Context, admi
543537	if  err  !=  nil  {
544538		return  fmt .Errorf ("error creating localhost: %v" , err )
545539	}
546- 	err  =  i .createInternalLBDeployment (ctx , apiIntHost )
540+ 	err  =  i .createInternalLBDeployment (ctx , apiIntHost ,  apiIntPort )
547541	if  err  !=  nil  {
548542		return  fmt .Errorf ("error creating internal LB: %v" , err )
549543	}
0 commit comments