Skip to content

Commit

Permalink
Ignore gateway targeted policies in api controller
Browse files Browse the repository at this point in the history
  • Loading branch information
Amila-Rukshan committed May 2, 2023
1 parent 20e32a6 commit 056b13c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions adapter/internal/operator/controllers/dp/api_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -646,6 +646,10 @@ func (apiReconciler *APIReconciler) getAPIsForAPIPolicy(obj k8client.Object) []r
}
requests := []reconcile.Request{}

if apiPolicy.Spec.TargetRef.Kind == constants.KindGateway {
return []reconcile.Request{}
}

// todo(amali) move this validation to validation hook
if !(apiPolicy.Spec.TargetRef.Kind == constants.KindAPI || apiPolicy.Spec.TargetRef.Kind == constants.KindResource) {
loggers.LoggerAPKOperator.Errorf("Unsupported target ref kind : %s was given for authentication: %s",
Expand Down

0 comments on commit 056b13c

Please sign in to comment.