Skip to content

Commit b2d02fb

Browse files
authored
Merge pull request #119 from datum-cloud/feat/gatewayconcurrentreconciles
feat: add config for gateway concurrent reconciles
2 parents da8fa1a + 28fc1c7 commit b2d02fb

File tree

4 files changed

+19
-1
lines changed

4 files changed

+19
-1
lines changed

config/crd/bases/networking.datumapis.com_httpproxies.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ spec:
2121
- jsonPath: .status.conditions[?(@.type=="Programmed")].status
2222
name: Programmed
2323
type: string
24+
- jsonPath: .status.conditions[?(@.type=="CertificatesReady")].status
25+
name: Certificates
26+
type: string
2427
- jsonPath: .metadata.creationTimestamp
2528
name: Age
2629
type: date

internal/config/config.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -558,6 +558,13 @@ type GatewayConfig struct {
558558
//
559559
// Defaults to false.
560560
EnableDNSIntegration bool `json:"enableDNSIntegration,omitempty"`
561+
562+
// MaxConcurrentReconciles is the maximum number of concurrent gateway
563+
// reconciliations. Higher values allow the controller to process gateways
564+
// across multiple projects in parallel.
565+
//
566+
// +default=5
567+
MaxConcurrentReconciles int `json:"maxConcurrentReconciles,omitempty"`
561568
}
562569

563570
// ShouldDeleteErroredChallenges returns whether the operator should automatically

internal/config/zz_generated.defaults.go

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

internal/controller/gateway_controller.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ import (
2626
"sigs.k8s.io/controller-runtime/pkg/client"
2727
"sigs.k8s.io/controller-runtime/pkg/client/apiutil"
2828
"sigs.k8s.io/controller-runtime/pkg/cluster"
29+
"sigs.k8s.io/controller-runtime/pkg/controller"
2930
"sigs.k8s.io/controller-runtime/pkg/controller/controllerutil"
3031
"sigs.k8s.io/controller-runtime/pkg/handler"
3132
"sigs.k8s.io/controller-runtime/pkg/log"
@@ -1613,7 +1614,11 @@ func (r *GatewayReconciler) SetupWithManager(mgr mcmanager.Manager) error {
16131614
)
16141615
}
16151616

1616-
return builder.Named("gateway").Complete(r)
1617+
return builder.
1618+
WithOptions(controller.TypedOptions[mcreconcile.Request]{
1619+
MaxConcurrentReconciles: r.Config.Gateway.MaxConcurrentReconciles,
1620+
}).
1621+
Named("gateway").Complete(r)
16171622
}
16181623

16191624
// listGatewaysAttachedByHTTPRoute is a watch predicate which finds all Gateways mentioned

0 commit comments

Comments
 (0)