Skip to content

Commit

Permalink
refactor: package import naming & use consts for reference annotation…
Browse files Browse the repository at this point in the history
… strings
  • Loading branch information
KevFan committed Feb 21, 2024
1 parent 4d21761 commit ff952a2
Show file tree
Hide file tree
Showing 11 changed files with 60 additions and 45 deletions.
7 changes: 5 additions & 2 deletions api/v1alpha1/dnspolicy_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ const (
DefaultWeight Weight = 120
DefaultGeo GeoCode = "default"
WildcardGeo GeoCode = "*"

DNSPolicyBackReferenceAnnotationName = "kuadrant.io/dnspolicies"
DNSPolicyDirectReferenceAnnotationName = "kuadrant.io/dnspolicy"
)

// DNSPolicySpec defines the desired state of DNSPolicy
Expand Down Expand Up @@ -161,11 +164,11 @@ func (p *DNSPolicy) GetTargetRef() gatewayapiv1alpha2.PolicyTargetReference {
func (p *DNSPolicy) Kind() string { return p.TypeMeta.Kind }

func (p *DNSPolicy) BackReferenceAnnotationName() string {
return "kuadrant.io/dnspolicies"
return DNSPolicyBackReferenceAnnotationName
}

func (p *DNSPolicy) DirectReferenceAnnotationName() string {
return "kuadrant.io/dnspolicy"
return DNSPolicyDirectReferenceAnnotationName
}

// Validate ensures the resource is valid. Compatible with the validating interface
Expand Down
9 changes: 7 additions & 2 deletions api/v1alpha1/tlspolicy_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@ import (
"github.com/kuadrant/kuadrant-operator/pkg/library/utils"
)

const (
TLSPolicyBackReferenceAnnotationName = "kuadrant.io/tlspolicies"
TLSPolicyDirectReferenceAnnotationName = "kuadrant.io/tlspolicy"
)

// TLSPolicySpec defines the desired state of TLSPolicy
type TLSPolicySpec struct {
// +kubebuilder:validation:Required
Expand Down Expand Up @@ -146,11 +151,11 @@ func (p *TLSPolicy) GetTargetRef() gatewayapiv1alpha2.PolicyTargetReference {
}

func (p *TLSPolicy) BackReferenceAnnotationName() string {
return "kuadrant.io/tlspolicies"
return TLSPolicyBackReferenceAnnotationName
}

func (p *TLSPolicy) DirectReferenceAnnotationName() string {
return "kuadrant.io/tlspolicy"
return TLSPolicyDirectReferenceAnnotationName
}

func (p *TLSPolicy) Validate() error {
Expand Down
9 changes: 7 additions & 2 deletions api/v1beta2/authpolicy_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@ import (
"github.com/kuadrant/kuadrant-operator/pkg/library/utils"
)

const (
AuthPolicyBackReferenceAnnotationName = "kuadrant.io/authpolicies"
AuthPolicyDirectReferenceAnnotationName = "kuadrant.io/authpolicy"
)

type AuthSchemeSpec struct {
// Authentication configs.
// At least one config MUST evaluate to a valid identity object for the auth request to be successful.
Expand Down Expand Up @@ -286,11 +291,11 @@ func (ap *AuthPolicy) Kind() string {
}

func (ap *AuthPolicy) BackReferenceAnnotationName() string {
return "kuadrant.io/authpolicies"
return AuthPolicyBackReferenceAnnotationName
}

func (ap *AuthPolicy) DirectReferenceAnnotationName() string {
return "kuadrant.io/authpolicy"
return AuthPolicyDirectReferenceAnnotationName
}

//+kubebuilder:object:root=true
Expand Down
7 changes: 5 additions & 2 deletions api/v1beta2/ratelimitpolicy_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@ const (
IncludeOperator WhenConditionOperator = "incl"
ExcludeOperator WhenConditionOperator = "excl"
MatchesOperator WhenConditionOperator = "matches"

RateLimitPolicyBackReferenceAnnotationName = "kuadrant.io/ratelimitpolicies"
RateLimitPolicyDirectReferenceAnnotationName = "kuadrant.io/ratelimitpolicy"
)

// +kubebuilder:validation:Enum:=second;minute;hour;day
Expand Down Expand Up @@ -250,11 +253,11 @@ func (r *RateLimitPolicy) Kind() string {
}

func (r *RateLimitPolicy) BackReferenceAnnotationName() string {
return "kuadrant.io/ratelimitpolicies"
return RateLimitPolicyBackReferenceAnnotationName
}

func (r *RateLimitPolicy) DirectReferenceAnnotationName() string {
return "kuadrant.io/ratelimitpolicy"
return RateLimitPolicyDirectReferenceAnnotationName
}

func init() {
Expand Down
10 changes: 5 additions & 5 deletions controllers/authpolicy_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import (

api "github.com/kuadrant/kuadrant-operator/api/v1beta2"
"github.com/kuadrant/kuadrant-operator/pkg/library/mappers"
reconcilers2 "github.com/kuadrant/kuadrant-operator/pkg/library/reconcilers"
reconcilerutils "github.com/kuadrant/kuadrant-operator/pkg/library/reconcilers"
"github.com/kuadrant/kuadrant-operator/pkg/library/utils"
"github.com/kuadrant/kuadrant-operator/pkg/reconcilers"
)
Expand All @@ -26,7 +26,7 @@ const authPolicyFinalizer = "authpolicy.kuadrant.io/finalizer"
// AuthPolicyReconciler reconciles a AuthPolicy object
type AuthPolicyReconciler struct {
*reconcilers.BaseReconciler
TargetRefReconciler reconcilers2.TargetRefReconciler
TargetRefReconciler reconcilerutils.TargetRefReconciler
// OverriddenPolicyMap tracks the overridden policies to report their status.
OverriddenPolicyMap *utils.OverriddenPolicyMap
}
Expand Down Expand Up @@ -64,7 +64,7 @@ func (r *AuthPolicyReconciler) Reconcile(eventCtx context.Context, req ctrl.Requ
markedForDeletion := ap.GetDeletionTimestamp() != nil

// fetch the target network object
targetNetworkObject, err := reconcilers2.FetchTargetRefObject(ctx, r.Client(), ap.GetTargetRef(), ap.Namespace)
targetNetworkObject, err := reconcilerutils.FetchTargetRefObject(ctx, r.Client(), ap.GetTargetRef(), ap.Namespace)
if err != nil {
if !markedForDeletion {
if apierrors.IsNotFound(err) {
Expand Down Expand Up @@ -155,7 +155,7 @@ func (r *AuthPolicyReconciler) reconcileResources(ctx context.Context, ap *api.A
}

// reconcile based on gateway diffs
gatewayDiffObj, err := reconcilers2.ComputeGatewayDiffs(ctx, r.Client(), ap, targetNetworkObject)
gatewayDiffObj, err := reconcilerutils.ComputeGatewayDiffs(ctx, r.Client(), ap, targetNetworkObject)
if err != nil {
return err
}
Expand All @@ -179,7 +179,7 @@ func (r *AuthPolicyReconciler) reconcileResources(ctx context.Context, ap *api.A

func (r *AuthPolicyReconciler) deleteResources(ctx context.Context, ap *api.AuthPolicy, targetNetworkObject client.Object) error {
// delete based on gateway diffs
gatewayDiffObj, err := reconcilers2.ComputeGatewayDiffs(ctx, r.Client(), ap, targetNetworkObject)
gatewayDiffObj, err := reconcilerutils.ComputeGatewayDiffs(ctx, r.Client(), ap, targetNetworkObject)
if err != nil {
return err
}
Expand Down
2 changes: 1 addition & 1 deletion controllers/dnshealthcheckprobe_eventmapper.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ func (m *DNSHealthCheckProbeEventMapper) MapToPolicy(obj client.Object, policyKi
if policyNamespace == "" {
return requests
}
logger.Info("mapToPolicyRequest", policyKind, policyName)
logger.Info("mapToPolicyRequest", policyKind.Kind(), policyName)
requests = append(requests, reconcile.Request{
NamespacedName: types.NamespacedName{
Name: policyName,
Expand Down
26 changes: 13 additions & 13 deletions controllers/dnspolicy_controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,16 @@ import (
. "github.com/onsi/gomega"
. "github.com/onsi/gomega/gstruct"

kuadrantdnsv1alpha1 "github.com/kuadrant/dns-operator/api/v1alpha1"
k8serrors "k8s.io/apimachinery/pkg/api/errors"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/utils/ptr"
"sigs.k8s.io/controller-runtime/pkg/client"
gatewayapiv1 "sigs.k8s.io/gateway-api/apis/v1"
gatewayapiv1alpha2 "sigs.k8s.io/gateway-api/apis/v1alpha2"

kuadrantdnsv1alpha1 "github.com/kuadrant/dns-operator/api/v1alpha1"
"github.com/kuadrant/kuadrant-operator/api/v1alpha1"
"github.com/kuadrant/kuadrant-operator/pkg/common"
"github.com/kuadrant/kuadrant-operator/pkg/library/utils"
"github.com/kuadrant/kuadrant-operator/pkg/multicluster"
)

Expand Down Expand Up @@ -119,8 +119,8 @@ var _ = Describe("DNSPolicy controller", func() {
Name: fmt.Sprintf("%s-%s-%s", TestIPAddressTwo, TestGatewayName, TestHostTwo),
Namespace: testNamespace,
Labels: map[string]string{
common.DNSPolicyBackRefAnnotation: "test-dns-policy",
fmt.Sprintf("%s-namespace", common.DNSPolicyBackRefAnnotation): testNamespace,
v1alpha1.DNSPolicyDirectReferenceAnnotationName: "test-dns-policy",
fmt.Sprintf("%s-namespace", v1alpha1.DNSPolicyDirectReferenceAnnotationName): testNamespace,
LabelGatewayNSRef: testNamespace,
LabelGatewayReference: "test-gateway",
},
Expand Down Expand Up @@ -187,7 +187,7 @@ var _ = Describe("DNSPolicy controller", func() {
ContainElement(MatchFields(IgnoreExtras, Fields{
"Type": Equal(string(gatewayapiv1alpha2.PolicyConditionAccepted)),
"Status": Equal(metav1.ConditionFalse),
"Reason": Equal(string(common.PolicyReasonUnknown)),
"Reason": Equal(string(utils.PolicyReasonUnknown)),
"Message": ContainSubstring("gateway is invalid: inconsistent status addresses"),
})),
)
Expand Down Expand Up @@ -244,8 +244,8 @@ var _ = Describe("DNSPolicy controller", func() {
gw := &gatewayapiv1.Gateway{}
err := k8sClient.Get(ctx, client.ObjectKey{Name: gateway.Name, Namespace: testNamespace}, gw)
g.Expect(err).NotTo(HaveOccurred())
g.Expect(gw.Annotations).To(HaveKeyWithValue(common.DNSPolicyBackRefAnnotation, policyBackRefValue))
g.Expect(gw.Annotations).To(HaveKeyWithValue(common.DNSPoliciesBackRefAnnotation, policiesBackRefValue))
g.Expect(gw.Annotations).To(HaveKeyWithValue(v1alpha1.DNSPolicyDirectReferenceAnnotationName, policyBackRefValue))
g.Expect(gw.Annotations).To(HaveKeyWithValue(v1alpha1.DNSPolicyBackReferenceAnnotationName, policiesBackRefValue))
}, TestTimeoutMedium, time.Second).Should(Succeed())
})
})
Expand Down Expand Up @@ -345,8 +345,8 @@ var _ = Describe("DNSPolicy controller", func() {
Eventually(func(g Gomega) {
err := k8sClient.Get(ctx, client.ObjectKeyFromObject(gateway), gateway)
g.Expect(err).NotTo(HaveOccurred())
g.Expect(gateway.Annotations).To(HaveKeyWithValue(common.DNSPolicyBackRefAnnotation, policyBackRefValue))
g.Expect(gateway.Annotations).To(HaveKeyWithValue(common.DNSPoliciesBackRefAnnotation, policiesBackRefValue))
g.Expect(gateway.Annotations).To(HaveKeyWithValue(v1alpha1.DNSPolicyDirectReferenceAnnotationName, policyBackRefValue))
g.Expect(gateway.Annotations).To(HaveKeyWithValue(v1alpha1.DNSPolicyBackReferenceAnnotationName, policiesBackRefValue))
}, TestTimeoutMedium, time.Second).Should(Succeed())
})

Expand Down Expand Up @@ -387,8 +387,8 @@ var _ = Describe("DNSPolicy controller", func() {
Eventually(func(g Gomega) {
err := k8sClient.Get(ctx, client.ObjectKeyFromObject(gateway), gateway)
g.Expect(err).NotTo(HaveOccurred())
g.Expect(gateway.Annotations).To(HaveKeyWithValue(common.DNSPolicyBackRefAnnotation, policyBackRefValue))
g.Expect(gateway.Annotations).To(HaveKeyWithValue(common.DNSPoliciesBackRefAnnotation, policiesBackRefValue))
g.Expect(gateway.Annotations).To(HaveKeyWithValue(v1alpha1.DNSPolicyDirectReferenceAnnotationName, policyBackRefValue))
g.Expect(gateway.Annotations).To(HaveKeyWithValue(v1alpha1.DNSPolicyBackReferenceAnnotationName, policiesBackRefValue))
g.Expect(gateway.Status.Conditions).To(
ContainElement(MatchFields(IgnoreExtras, Fields{
"Type": Equal(DNSPolicyAffected),
Expand All @@ -409,8 +409,8 @@ var _ = Describe("DNSPolicy controller", func() {
Eventually(func(g Gomega) {
err := k8sClient.Get(ctx, client.ObjectKeyFromObject(gateway), gateway)
g.Expect(err).NotTo(HaveOccurred())
g.Expect(gateway.Annotations).ToNot(HaveKey(common.DNSPolicyBackRefAnnotation))
g.Expect(gateway.Annotations).ToNot(HaveKeyWithValue(common.DNSPoliciesBackRefAnnotation, policiesBackRefValue))
g.Expect(gateway.Annotations).ToNot(HaveKey(v1alpha1.DNSPolicyDirectReferenceAnnotationName))
g.Expect(gateway.Annotations).ToNot(HaveKeyWithValue(v1alpha1.DNSPolicyBackReferenceAnnotationName, policiesBackRefValue))
g.Expect(gateway.Status.Conditions).ToNot(
ContainElement(MatchFields(IgnoreExtras, Fields{
"Type": Equal(string(DNSPolicyAffected)),
Expand Down
10 changes: 5 additions & 5 deletions controllers/ratelimitpolicy_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import (

kuadrantv1beta2 "github.com/kuadrant/kuadrant-operator/api/v1beta2"
"github.com/kuadrant/kuadrant-operator/pkg/library/mappers"
reconcilers2 "github.com/kuadrant/kuadrant-operator/pkg/library/reconcilers"
reconcilerutils "github.com/kuadrant/kuadrant-operator/pkg/library/reconcilers"
"github.com/kuadrant/kuadrant-operator/pkg/library/utils"
"github.com/kuadrant/kuadrant-operator/pkg/reconcilers"
)
Expand All @@ -41,7 +41,7 @@ const rateLimitPolicyFinalizer = "ratelimitpolicy.kuadrant.io/finalizer"
// RateLimitPolicyReconciler reconciles a RateLimitPolicy object
type RateLimitPolicyReconciler struct {
*reconcilers.BaseReconciler
TargetRefReconciler reconcilers2.TargetRefReconciler
TargetRefReconciler reconcilerutils.TargetRefReconciler
}

//+kubebuilder:rbac:groups=kuadrant.io,resources=ratelimitpolicies,verbs=get;list;watch;create;update;patch;delete
Expand Down Expand Up @@ -88,7 +88,7 @@ func (r *RateLimitPolicyReconciler) Reconcile(eventCtx context.Context, req ctrl
markedForDeletion := rlp.GetDeletionTimestamp() != nil

// fetch the target network object
targetNetworkObject, err := reconcilers2.FetchTargetRefObject(ctx, r.Client(), rlp.GetTargetRef(), rlp.Namespace)
targetNetworkObject, err := reconcilerutils.FetchTargetRefObject(ctx, r.Client(), rlp.GetTargetRef(), rlp.Namespace)
if err != nil {
if !markedForDeletion {
if apierrors.IsNotFound(err) {
Expand Down Expand Up @@ -172,7 +172,7 @@ func (r *RateLimitPolicyReconciler) reconcileResources(ctx context.Context, rlp
}

// reconcile based on gateway diffs
gatewayDiffObj, err := reconcilers2.ComputeGatewayDiffs(ctx, r.Client(), rlp, targetNetworkObject)
gatewayDiffObj, err := reconcilerutils.ComputeGatewayDiffs(ctx, r.Client(), rlp, targetNetworkObject)
if err != nil {
return err
}
Expand All @@ -196,7 +196,7 @@ func (r *RateLimitPolicyReconciler) reconcileResources(ctx context.Context, rlp

func (r *RateLimitPolicyReconciler) deleteResources(ctx context.Context, rlp *kuadrantv1beta2.RateLimitPolicy, targetNetworkObject client.Object) error {
// delete based on gateway diffs
gatewayDiffObj, err := reconcilers2.ComputeGatewayDiffs(ctx, r.Client(), rlp, targetNetworkObject)
gatewayDiffObj, err := reconcilerutils.ComputeGatewayDiffs(ctx, r.Client(), rlp, targetNetworkObject)
if err != nil {
return err
}
Expand Down
10 changes: 5 additions & 5 deletions controllers/suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ import (
kuadrantv1alpha1 "github.com/kuadrant/kuadrant-operator/api/v1alpha1"
kuadrantv1beta1 "github.com/kuadrant/kuadrant-operator/api/v1beta1"
kuadrantv1beta2 "github.com/kuadrant/kuadrant-operator/api/v1beta2"
reconcilers2 "github.com/kuadrant/kuadrant-operator/pkg/library/reconcilers"
reconcilerutils "github.com/kuadrant/kuadrant-operator/pkg/library/reconcilers"
"github.com/kuadrant/kuadrant-operator/pkg/library/utils"
"github.com/kuadrant/kuadrant-operator/pkg/log"
"github.com/kuadrant/kuadrant-operator/pkg/reconcilers"
Expand Down Expand Up @@ -147,7 +147,7 @@ var _ = BeforeSuite(func() {

err = (&AuthPolicyReconciler{
BaseReconciler: authPolicyBaseReconciler,
TargetRefReconciler: reconcilers2.TargetRefReconciler{Client: mgr.GetClient()},
TargetRefReconciler: reconcilerutils.TargetRefReconciler{Client: mgr.GetClient()},
OverriddenPolicyMap: utils.NewOverriddenPolicyMap(),
}).SetupWithManager(mgr)
Expect(err).NotTo(HaveOccurred())
Expand All @@ -160,7 +160,7 @@ var _ = BeforeSuite(func() {

err = (&RateLimitPolicyReconciler{
BaseReconciler: rateLimitPolicyBaseReconciler,
TargetRefReconciler: reconcilers2.TargetRefReconciler{Client: mgr.GetClient()},
TargetRefReconciler: reconcilerutils.TargetRefReconciler{Client: mgr.GetClient()},
}).SetupWithManager(mgr)

Expect(err).NotTo(HaveOccurred())
Expand All @@ -173,7 +173,7 @@ var _ = BeforeSuite(func() {

err = (&TLSPolicyReconciler{
BaseReconciler: tlsPolicyBaseReconciler,
TargetRefReconciler: reconcilers2.TargetRefReconciler{Client: mgr.GetClient()},
TargetRefReconciler: reconcilerutils.TargetRefReconciler{Client: mgr.GetClient()},
}).SetupWithManager(mgr)

Expect(err).NotTo(HaveOccurred())
Expand All @@ -186,7 +186,7 @@ var _ = BeforeSuite(func() {

err = (&DNSPolicyReconciler{
BaseReconciler: dnsPolicyBaseReconciler,
TargetRefReconciler: reconcilers2.TargetRefReconciler{Client: mgr.GetClient()},
TargetRefReconciler: reconcilerutils.TargetRefReconciler{Client: mgr.GetClient()},
}).SetupWithManager(mgr)

Expect(err).NotTo(HaveOccurred())
Expand Down
5 changes: 2 additions & 3 deletions controllers/tlspolicy_controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ import (
gatewayapiv1alpha2 "sigs.k8s.io/gateway-api/apis/v1alpha2"

"github.com/kuadrant/kuadrant-operator/api/v1alpha1"
"github.com/kuadrant/kuadrant-operator/pkg/common"
)

var _ = Describe("TLSPolicy controller", Ordered, func() {
Expand Down Expand Up @@ -167,8 +166,8 @@ var _ = Describe("TLSPolicy controller", Ordered, func() {
err := k8sClient.Get(ctx, client.ObjectKey{Name: gateway.Name, Namespace: testNamespace}, gw)
//Check annotations
g.Expect(err).NotTo(HaveOccurred())
g.Expect(gw.Annotations).To(HaveKeyWithValue(common.TLSPolicyBackRefAnnotation, policyBackRefValue))
g.Expect(gw.Annotations).To(HaveKeyWithValue(common.TLSPoliciesBackRefAnnotation, policiesBackRefValue))
g.Expect(gw.Annotations).To(HaveKeyWithValue(v1alpha1.TLSPolicyDirectReferenceAnnotationName, policyBackRefValue))
g.Expect(gw.Annotations).To(HaveKeyWithValue(v1alpha1.TLSPolicyBackReferenceAnnotationName, policiesBackRefValue))
//Check status
g.Expect(gw.Status.Conditions).To(
ContainElement(MatchFields(IgnoreExtras, Fields{
Expand Down
10 changes: 5 additions & 5 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ import (
kuadrantv1beta1 "github.com/kuadrant/kuadrant-operator/api/v1beta1"
kuadrantv1beta2 "github.com/kuadrant/kuadrant-operator/api/v1beta2"
"github.com/kuadrant/kuadrant-operator/controllers"
reconcilers2 "github.com/kuadrant/kuadrant-operator/pkg/library/reconcilers"
reconcilerutils "github.com/kuadrant/kuadrant-operator/pkg/library/reconcilers"
"github.com/kuadrant/kuadrant-operator/pkg/library/utils"
"github.com/kuadrant/kuadrant-operator/pkg/log"
"github.com/kuadrant/kuadrant-operator/pkg/reconcilers"
Expand Down Expand Up @@ -156,7 +156,7 @@ func main() {
)

if err = (&controllers.RateLimitPolicyReconciler{
TargetRefReconciler: reconcilers2.TargetRefReconciler{Client: mgr.GetClient()},
TargetRefReconciler: reconcilerutils.TargetRefReconciler{Client: mgr.GetClient()},
BaseReconciler: rateLimitPolicyBaseReconciler,
}).SetupWithManager(mgr); err != nil {
setupLog.Error(err, "unable to create controller", "controller", "RateLimitPolicy")
Expand All @@ -170,7 +170,7 @@ func main() {
)

if err = (&controllers.AuthPolicyReconciler{
TargetRefReconciler: reconcilers2.TargetRefReconciler{Client: mgr.GetClient()},
TargetRefReconciler: reconcilerutils.TargetRefReconciler{Client: mgr.GetClient()},
BaseReconciler: authPolicyBaseReconciler,
OverriddenPolicyMap: utils.NewOverriddenPolicyMap(),
}).SetupWithManager(mgr); err != nil {
Expand All @@ -186,7 +186,7 @@ func main() {

if err = (&controllers.DNSPolicyReconciler{
BaseReconciler: dnsPolicyBaseReconciler,
TargetRefReconciler: reconcilers2.TargetRefReconciler{Client: mgr.GetClient()},
TargetRefReconciler: reconcilerutils.TargetRefReconciler{Client: mgr.GetClient()},
}).SetupWithManager(mgr); err != nil {
setupLog.Error(err, "unable to create controller", "controller", "DNSPolicy")
os.Exit(1)
Expand All @@ -200,7 +200,7 @@ func main() {

if err = (&controllers.TLSPolicyReconciler{
BaseReconciler: tlsPolicyBaseReconciler,
TargetRefReconciler: reconcilers2.TargetRefReconciler{Client: mgr.GetClient()},
TargetRefReconciler: reconcilerutils.TargetRefReconciler{Client: mgr.GetClient()},
}).SetupWithManager(mgr); err != nil {
setupLog.Error(err, "unable to create controller", "controller", "TLSPolicy")
os.Exit(1)
Expand Down

0 comments on commit ff952a2

Please sign in to comment.