diff --git a/internal/reconcilers/controller/dnsrecord_controller.go b/internal/reconcilers/controller/dnsrecord_controller.go index ceb882a..390272b 100644 --- a/internal/reconcilers/controller/dnsrecord_controller.go +++ b/internal/reconcilers/controller/dnsrecord_controller.go @@ -80,7 +80,7 @@ func (r *DNSRecordReconciler) Reconcile(ctx context.Context, req ctrl.Request) ( } if lock.Condition().Status == konditions.ConditionInitialized { - lock.Execute(ctx, func(c konditions.Condition) (konditions.Condition, error) { + return ctrl.Result{}, lock.Execute(ctx, func(c konditions.Condition) (konditions.Condition, error) { found := 0 var integrations phonebook.DNSIntegrationList @@ -98,8 +98,8 @@ func (r *DNSRecordReconciler) Reconcile(ctx context.Context, req ctrl.Request) ( if slices.Contains(integration.Spec.Zones, record.Spec.Zone) { found += 1 record.Status.Conditions.SetCondition(konditions.Condition{ - Type: konditions.ConditionType(fmt.Sprintf("provider://%s", integration.Name)), - Status: konditions.ConditionCompleted, + Type: konditions.ConditionType(fmt.Sprintf("provider.%s", integration.Name)), + Status: konditions.ConditionInitialized, Reason: fmt.Sprintf("Integration has authority over %s", record.Spec.Zone), }) } diff --git a/internal/reconcilers/provider/provider.go b/internal/reconcilers/provider/provider.go index dfa6255..0f3298b 100644 --- a/internal/reconcilers/provider/provider.go +++ b/internal/reconcilers/provider/provider.go @@ -49,7 +49,7 @@ func (r *ProviderReconciler) Reconcile(ctx context.Context, req ctrl.Request) (r record: record, } - conditionType := konditions.ConditionType(r.Integration) + conditionType := konditions.ConditionType(fmt.Sprintf("provider.%s", r.Integration)) condition := record.Status.Conditions.FindType(conditionType) if condition == nil || condition.Status == konditions.ConditionError || condition.Status == konditions.ConditionCompleted { return result, nil