diff --git a/hack/generated/controllers/generic_controller.go b/hack/generated/controllers/generic_controller.go index 8390ba22736..42998e88c26 100644 --- a/hack/generated/controllers/generic_controller.go +++ b/hack/generated/controllers/generic_controller.go @@ -194,7 +194,7 @@ func (gr *GenericReconciler) Reconcile(ctx context.Context, req ctrl.Request) (c // (actually a reference or shallow copy) of an object, you'll mess up other controllers (not just your own). obj = obj.DeepCopyObject().(client.Object) - gr.Log.V(0).Info( + gr.Log.V(1).Info( "Reconcile invoked", "kind", fmt.Sprintf("%T", obj), "resourceVersion", obj.GetResourceVersion()) diff --git a/hack/generated/pkg/genruntime/conditions/ready_condition_builder.go b/hack/generated/pkg/genruntime/conditions/ready_condition_builder.go index adbc680a5a4..715af3b1f78 100644 --- a/hack/generated/pkg/genruntime/conditions/ready_condition_builder.go +++ b/hack/generated/pkg/genruntime/conditions/ready_condition_builder.go @@ -5,6 +5,8 @@ Licensed under the MIT license. package conditions +import "fmt" + const ( ReasonReconciling = "Reconciling" ReasonWaitingForOwner = "WaitingForOwner" @@ -29,12 +31,12 @@ func (b *ReadyConditionBuilder) Reconciling() Condition { "The resource is in the process of being reconciled by the operator") } -func (b *ReadyConditionBuilder) WaitingForOwner() Condition { +func (b *ReadyConditionBuilder) WaitingForOwner(ownerDetails string) Condition { return b.builder.MakeFalseCondition( ConditionTypeReady, ConditionSeverityWarning, ReasonWaitingForOwner, - "The owner of this resource cannot be found in Kubernetes. Process is blocked until the owner is created.") + fmt.Sprintf("Owner %q cannot be found. Progress is blocked until the owner is created.", ownerDetails)) } func (b *ReadyConditionBuilder) Deleting() Condition { diff --git a/hack/generated/pkg/genruntime/resource_reference.go b/hack/generated/pkg/genruntime/resource_reference.go index f562f01b641..74e2ae4750c 100644 --- a/hack/generated/pkg/genruntime/resource_reference.go +++ b/hack/generated/pkg/genruntime/resource_reference.go @@ -66,7 +66,7 @@ func (ref ResourceReference) String() string { } if ref.IsKubernetesReference() { - return fmt.Sprintf("Group: %q, Kind: %q, Namespace: %q, Name: %q", ref.Group, ref.Kind, ref.Namespace, ref.Name) + return fmt.Sprintf("%s/%s, GroupKind: %s/%s", ref.Namespace, ref.Name, ref.Group, ref.Kind) } // Printing all the fields here just in case something weird happens and we have an ARMID and also Kubernetes reference stuff diff --git a/hack/generated/pkg/reconcilers/azure_deployment_reconciler.go b/hack/generated/pkg/reconcilers/azure_deployment_reconciler.go index 4191015e8a6..9f43e0d06fd 100644 --- a/hack/generated/pkg/reconcilers/azure_deployment_reconciler.go +++ b/hack/generated/pkg/reconcilers/azure_deployment_reconciler.go @@ -706,10 +706,7 @@ func (r *AzureDeploymentReconciler) ManageOwnership(ctx context.Context) (ctrl.R } if !isOwnerReady { - // TODO: We need to figure out how we're handing these sorts of errors. - // TODO: See https://github.com/Azure/azure-service-operator/issues/1448 - // TODO: For now just set an error so we at least see something - conditions.SetCondition(r.obj, r.PositiveConditions.Ready.WaitingForOwner()) + conditions.SetCondition(r.obj, r.PositiveConditions.Ready.WaitingForOwner(r.obj.Owner().String())) err = r.CommitUpdate(ctx) err = client.IgnoreNotFound(err)