diff --git a/pkg/operator/awspodidentity/awspodidentitywebhook_controller.go b/pkg/operator/awspodidentity/awspodidentitywebhook_controller.go index c1ba3cd098..bdd34bd075 100644 --- a/pkg/operator/awspodidentity/awspodidentitywebhook_controller.go +++ b/pkg/operator/awspodidentity/awspodidentitywebhook_controller.go @@ -133,11 +133,15 @@ func Add(mgr manager.Manager, kubeconfig string) error { if err != nil { return err } + // Only add controller when PlatformType is AWS platformType := platform.GetType(infraStatus) if platformType != configv1.AWSPlatformType { return nil } - + // Do not add controller when ControlPlaneTopology is External + if infraStatus.ControlPlaneTopology == configv1.ExternalTopologyMode { + return nil + } log.Info("setting up AWS pod identity controller") config := mgr.GetConfig()