Skip to content

Commit

Permalink
Revert "authpolicy controller watches authconfig"
Browse files Browse the repository at this point in the history
This reverts commit f49f9c1.
  • Loading branch information
guicassolato committed Dec 1, 2023
1 parent 6879f16 commit c800e34
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 7 deletions.
5 changes: 0 additions & 5 deletions controllers/authpolicy_authconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,6 @@ func (r *AuthPolicyReconciler) reconcileAuthConfigs(ctx context.Context, ap *api
return err
}

err = r.SetOwnerReference(ap, authConfig)
if err != nil {
return err
}

err = r.ReconcileResource(ctx, &authorinoapi.AuthConfig{}, authConfig, alwaysUpdateAuthConfig)
if err != nil && !apierrors.IsAlreadyExists(err) {
logger.Error(err, "ReconcileResource failed to create/update AuthConfig resource")
Expand Down
2 changes: 0 additions & 2 deletions controllers/authpolicy_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import (
"sigs.k8s.io/controller-runtime/pkg/handler"
gatewayapiv1 "sigs.k8s.io/gateway-api/apis/v1"

authorinoapi "github.com/kuadrant/authorino/api/v1beta2"
api "github.com/kuadrant/kuadrant-operator/api/v1beta2"
"github.com/kuadrant/kuadrant-operator/pkg/common"
"github.com/kuadrant/kuadrant-operator/pkg/reconcilers"
Expand Down Expand Up @@ -227,7 +226,6 @@ func (r *AuthPolicyReconciler) SetupWithManager(mgr ctrl.Manager) error {

return ctrl.NewControllerManagedBy(mgr).
For(&api.AuthPolicy{}).
Owns(&authorinoapi.AuthConfig{}).
Watches(
&gatewayapiv1.HTTPRoute{},
handler.EnqueueRequestsFromMapFunc(httpRouteEventMapper.MapToAuthPolicy),
Expand Down

0 comments on commit c800e34

Please sign in to comment.