@@ -1032,7 +1032,7 @@ func installComponents(ctx context.Context, opts *RuntimeInstallOptions, rt *run
10321032
10331033 // bitbucket cloud take more time to push a commit
10341034 // the perpuse of all retries is to avoid issues of cloning before pervious commit was pushed
1035- if opts .shouldInstallIngress () && rt . Spec . IngressController != string ( routingutil . IngressControllerALB ) {
1035+ if opts .shouldInstallIngress () {
10361036 if err = util .Retry (ctx , & util.RetryOptions {
10371037 Func : func () error {
10381038 return CreateInternalRouterIngress (ctx , & CreateIngressOptions {
@@ -1048,7 +1048,7 @@ func installComponents(ctx context.Context, opts *RuntimeInstallOptions, rt *run
10481048 InternalIngressAnnotation : opts .InternalIngressAnnotation ,
10491049 ExternalIngressAnnotation : opts .ExternalIngressAnnotation ,
10501050 useGatewayAPI : opts .useGatewayAPI ,
1051- }, rt )
1051+ }, rt , false )
10521052 },
10531053 }); err != nil {
10541054 return fmt .Errorf ("failed to patch Internal Router ingress: %w" , err )
@@ -1397,7 +1397,7 @@ func persistRuntime(ctx context.Context, cloneOpts *apgit.CloneOptions, rt *runt
13971397 return apu .PushWithMessage (ctx , r , "Persisted runtime data" )
13981398}
13991399
1400- func CreateInternalRouterIngress (ctx context.Context , opts * CreateIngressOptions , rt * runtime.Runtime ) error {
1400+ func CreateInternalRouterIngress (ctx context.Context , opts * CreateIngressOptions , rt * runtime.Runtime , onlyWebhooks bool ) error {
14011401 r , fs , err := opts .InsCloneOpts .GetRepo (ctx )
14021402 if err != nil {
14031403 return err
@@ -1416,7 +1416,7 @@ func CreateInternalRouterIngress(ctx context.Context, opts *CreateIngressOptions
14161416 GatewayName : opts .GatewayName ,
14171417 GatewayNamespace : opts .GatewayNamespace ,
14181418 }
1419- routeName , route := routingutil .CreateInternalRouterRoute (& routeOpts , opts .useGatewayAPI , ! internalIngressEnabled )
1419+ routeName , route := routingutil .CreateInternalRouterRoute (& routeOpts , opts .useGatewayAPI , ! internalIngressEnabled , onlyWebhooks )
14201420 routeFileName := fmt .Sprintf ("%s.yaml" , routeName )
14211421
14221422 if err := writeObjectToYaml (fs , fs .Join (overlaysDir , routeFileName ), & route , cleanUpFieldsIngress ); err != nil {
@@ -1432,7 +1432,7 @@ func CreateInternalRouterIngress(ctx context.Context, opts *CreateIngressOptions
14321432 kust .Resources = append (kust .Resources , routeFileName )
14331433 }
14341434
1435- if internalIngressEnabled {
1435+ if ! onlyWebhooks && internalIngressEnabled {
14361436 routeOpts := routingutil.CreateRouteOpts {
14371437 RuntimeName : rt .Name ,
14381438 Namespace : rt .Namespace ,
0 commit comments