Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions internal/controller/apisixpluginconfig_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ import (

apiv2 "github.com/apache/apisix-ingress-controller/api/v2"
"github.com/apache/apisix-ingress-controller/internal/controller/status"
"github.com/apache/apisix-ingress-controller/internal/manager/readiness"
"github.com/apache/apisix-ingress-controller/internal/provider"
"github.com/apache/apisix-ingress-controller/internal/utils"
)
Expand All @@ -39,6 +40,7 @@ type ApisixPluginConfigReconciler struct {
Scheme *runtime.Scheme
Log logr.Logger
Updater status.Updater
Readier readiness.ReadinessManager
}

// SetupWithManager sets up the controller with the Manager.
Expand All @@ -51,6 +53,7 @@ func (r *ApisixPluginConfigReconciler) SetupWithManager(mgr ctrl.Manager) error
}

func (r *ApisixPluginConfigReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error) {
defer r.Readier.Done(&apiv2.ApisixPluginConfig{}, req.NamespacedName)
var pc apiv2.ApisixPluginConfig
if err := r.Get(ctx, req.NamespacedName, &pc); err != nil {
return ctrl.Result{}, client.IgnoreNotFound(err)
Expand Down
3 changes: 3 additions & 0 deletions internal/controller/apisixupstream_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ import (

apiv2 "github.com/apache/apisix-ingress-controller/api/v2"
"github.com/apache/apisix-ingress-controller/internal/controller/status"
"github.com/apache/apisix-ingress-controller/internal/manager/readiness"
"github.com/apache/apisix-ingress-controller/internal/provider"
"github.com/apache/apisix-ingress-controller/internal/utils"
)
Expand All @@ -38,6 +39,7 @@ type ApisixUpstreamReconciler struct {
Scheme *runtime.Scheme
Log logr.Logger
Updater status.Updater
Readier readiness.ReadinessManager
}

// SetupWithManager sets up the controller with the Manager.
Expand All @@ -50,6 +52,7 @@ func (r *ApisixUpstreamReconciler) SetupWithManager(mgr ctrl.Manager) error {
}

func (r *ApisixUpstreamReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error) {
defer r.Readier.Done(&apiv2.ApisixUpstream{}, req.NamespacedName)
var au apiv2.ApisixUpstream
if err := r.Get(ctx, req.NamespacedName, &au); err != nil {
return ctrl.Result{}, client.IgnoreNotFound(err)
Expand Down
2 changes: 2 additions & 0 deletions internal/manager/controllers.go
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,7 @@ func setupAPIv2Controllers(ctx context.Context, mgr manager.Manager, pro provide
Scheme: mgr.GetScheme(),
Log: ctrl.LoggerFrom(ctx).WithName("controllers").WithName(types.KindApisixPluginConfig),
Updater: updater,
Readier: readier,
},
&apiv2.ApisixTls{}: &controller.ApisixTlsReconciler{
Client: mgr.GetClient(),
Expand All @@ -283,6 +284,7 @@ func setupAPIv2Controllers(ctx context.Context, mgr manager.Manager, pro provide
Scheme: mgr.GetScheme(),
Log: ctrl.LoggerFrom(ctx).WithName("controllers").WithName(types.KindApisixUpstream),
Updater: updater,
Readier: readier,
},
} {
if utils.HasAPIResource(mgr, resource) {
Expand Down
Loading