Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions pkg/apis/eventing/v1/trigger_lifecycle.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,11 +92,11 @@ func (ts *TriggerStatus) PropagateBrokerCondition(bc *apis.Condition) {

switch {
case bc.Status == corev1.ConditionUnknown:
ts.MarkBrokerUnknown(bc.Reason, bc.Message)
ts.MarkBrokerUnknown(bc.Reason, "%s", bc.Message)
case bc.Status == corev1.ConditionTrue:
triggerCondSet.Manage(ts).MarkTrue(TriggerConditionBroker)
case bc.Status == corev1.ConditionFalse:
ts.MarkBrokerFailed(bc.Reason, bc.Message)
ts.MarkBrokerFailed(bc.Reason, "%s", bc.Message)
default:
ts.MarkBrokerUnknown("BrokerUnknown", "The status of Broker is invalid: %v", bc.Status)
}
Expand All @@ -123,11 +123,11 @@ func (ts *TriggerStatus) PropagateSubscriptionCondition(sc *apis.Condition) {

switch {
case sc.Status == corev1.ConditionUnknown:
ts.MarkSubscribedUnknown(sc.Reason, sc.Message)
ts.MarkSubscribedUnknown(sc.Reason, "%s", sc.Message)
case sc.Status == corev1.ConditionTrue:
triggerCondSet.Manage(ts).MarkTrue(TriggerConditionSubscribed)
case sc.Status == corev1.ConditionFalse:
ts.MarkNotSubscribed(sc.Reason, sc.Message)
ts.MarkNotSubscribed(sc.Reason, "%s", sc.Message)
default:
ts.MarkSubscribedUnknown("SubscriptionUnknown", "The status of Subscription is invalid: %v", sc.Status)
}
Expand Down Expand Up @@ -196,11 +196,11 @@ func (ts *TriggerStatus) PropagateDependencyStatus(ks *duckv1.Source) {

switch {
case kc.Status == corev1.ConditionUnknown:
ts.MarkDependencyUnknown(kc.Reason, kc.Message)
ts.MarkDependencyUnknown(kc.Reason, "%s", kc.Message)
case kc.Status == corev1.ConditionTrue:
ts.MarkDependencySucceeded()
case kc.Status == corev1.ConditionFalse:
ts.MarkDependencyFailed(kc.Reason, kc.Message)
ts.MarkDependencyFailed(kc.Reason, "%s", kc.Message)
default:
ts.MarkDependencyUnknown("DependencyUnknown", "The status of Dependency is invalid: %v", kc.Status)
}
Expand Down
12 changes: 6 additions & 6 deletions pkg/apis/eventing/v1alpha1/eventtransform_lifecycle.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,11 +120,11 @@ func (ts *EventTransformStatus) PropagateJsonataCertificateStatus(cs cmv1.Certif
return false
}
if topLevel.Status == cmmeta.ConditionUnknown {
transformJsonataConditionSet.Manage(ts).MarkUnknown(TransformationJsonataDeploymentReady, TransformationJsonataCertificateNotReady, "Certificate is progressing, "+topLevel.Reason+" Message: "+topLevel.Message)
transformJsonataConditionSet.Manage(ts).MarkUnknown(TransformationJsonataDeploymentReady, TransformationJsonataCertificateNotReady, "Certificate is progressing, %s Message: %s", topLevel.Reason, topLevel.Message)
return false
}
if topLevel.Status == cmmeta.ConditionFalse {
transformJsonataConditionSet.Manage(ts).MarkFalse(TransformationJsonataDeploymentReady, TransformationJsonataCertificateNotReady, "Certificate is not ready, "+topLevel.Reason+" Message: "+topLevel.Message)
transformJsonataConditionSet.Manage(ts).MarkFalse(TransformationJsonataDeploymentReady, TransformationJsonataCertificateNotReady, "Certificate is not ready, %s Message: %s", topLevel.Reason, topLevel.Message)
return false
}
return true
Expand Down Expand Up @@ -155,10 +155,10 @@ func (ts *EventTransformStatus) PropagateJsonataSinkBindingStatus(sbs sourcesv1.
return true
}
if topLevel.IsFalse() {
transformJsonataConditionSet.Manage(ts).MarkFalse(TransformationJsonataSinkBindingReady, topLevel.Reason, topLevel.Message)
transformJsonataConditionSet.Manage(ts).MarkFalse(TransformationJsonataSinkBindingReady, topLevel.Reason, "%s", topLevel.Message)
return false
}
transformJsonataConditionSet.Manage(ts).MarkUnknown(TransformationJsonataSinkBindingReady, topLevel.Reason, topLevel.Message)
transformJsonataConditionSet.Manage(ts).MarkUnknown(TransformationJsonataSinkBindingReady, topLevel.Reason, "%s", topLevel.Message)
return false
}

Expand Down Expand Up @@ -187,9 +187,9 @@ func (ts *EventTransformStatus) propagateTransformationConditionStatus(cond *api
} else if cond.IsTrue() {
ts.GetConditionSet().Manage(ts).MarkTrue(TransformationConditionReady)
} else if cond.IsFalse() {
ts.GetConditionSet().Manage(ts).MarkFalse(TransformationConditionReady, cond.Reason, cond.Message)
ts.GetConditionSet().Manage(ts).MarkFalse(TransformationConditionReady, cond.Reason, "%s", cond.Message)
} else {
ts.GetConditionSet().Manage(ts).MarkUnknown(TransformationConditionReady, cond.Reason, cond.Message)
ts.GetConditionSet().Manage(ts).MarkUnknown(TransformationConditionReady, cond.Reason, "%s", cond.Message)
}
}

Expand Down
4 changes: 2 additions & 2 deletions pkg/apis/eventing/v1beta1/eventtype_lifecycle.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,11 +93,11 @@ func (et *EventTypeStatus) PropagateBrokerStatus(bs *eventingv1.BrokerStatus) {
}
switch {
case bc.Status == corev1.ConditionUnknown:
et.MarkBrokerUnknown(bc.Reason, bc.Message)
et.MarkBrokerUnknown(bc.Reason, "%s", bc.Message)
case bc.Status == corev1.ConditionTrue:
eventTypeCondSet.Manage(et).MarkTrue(EventTypeConditionBrokerReady)
case bc.Status == corev1.ConditionFalse:
et.MarkBrokerFailed(bc.Reason, bc.Message)
et.MarkBrokerFailed(bc.Reason, "%s", bc.Message)
default:
et.MarkBrokerUnknown("BrokerUnknown", "The status of Broker is invalid: %v", bc.Status)
}
Expand Down
4 changes: 2 additions & 2 deletions pkg/apis/messaging/v1/channel_lifecycle.go
Original file line number Diff line number Diff line change
Expand Up @@ -122,11 +122,11 @@ func (cs *ChannelStatus) PropagateStatuses(chs *eventingduck.ChannelableStatus)
} else {
switch {
case readyCondition.Status == corev1.ConditionUnknown:
cs.MarkBackingChannelUnknown(readyCondition.Reason, readyCondition.Message)
cs.MarkBackingChannelUnknown(readyCondition.Reason, "%s", readyCondition.Message)
case readyCondition.Status == corev1.ConditionTrue:
cs.MarkBackingChannelReady()
case readyCondition.Status == corev1.ConditionFalse:
cs.MarkBackingChannelFailed(readyCondition.Reason, readyCondition.Message)
cs.MarkBackingChannelFailed(readyCondition.Reason, "%s", readyCondition.Message)
default:
cs.MarkBackingChannelUnknown("BackingChannelUnknown", "The status of BackingChannel is invalid: %v", readyCondition.Status)
}
Expand Down
10 changes: 5 additions & 5 deletions pkg/apis/sinks/v1alpha1/integration_sink_lifecycle.go
Original file line number Diff line number Diff line change
Expand Up @@ -132,13 +132,13 @@ func (s *IntegrationSinkStatus) PropagateDeploymentStatus(d *appsv1.Deployment)
if cond.Type == appsv1.DeploymentAvailable {
deploymentAvailableFound = true
if cond.Status == corev1.ConditionFalse {
IntegrationSinkCondSet.Manage(s).MarkFalse(IntegrationSinkConditionDeploymentReady, cond.Reason, cond.Message)
IntegrationSinkCondSet.Manage(s).MarkFalse(IntegrationSinkConditionDeploymentReady, cond.Reason, "%s", cond.Message)
return
}
}
// Also check Progressing condition for failures (e.g., ImagePullBackOff, insufficient quota)
if cond.Type == appsv1.DeploymentProgressing && cond.Status == corev1.ConditionFalse {
IntegrationSinkCondSet.Manage(s).MarkFalse(IntegrationSinkConditionDeploymentReady, cond.Reason, cond.Message)
IntegrationSinkCondSet.Manage(s).MarkFalse(IntegrationSinkConditionDeploymentReady, cond.Reason, "%s", cond.Message)
return
}
}
Expand Down Expand Up @@ -171,13 +171,13 @@ func (s *IntegrationSinkStatus) PropagateCertificateStatus(cs cmv1.CertificateSt

if topLevel.Status == cmmeta.ConditionUnknown {
IntegrationSinkCondSet.Manage(s).MarkUnknown(IntegrationSinkConditionCertificateReady,
IntegrationSinkCertificateNotReady, "Certificate is progressing, "+topLevel.Reason+" Message: "+topLevel.Message)
IntegrationSinkCertificateNotReady, "Certificate is progressing, %s Message: %s", topLevel.Reason, topLevel.Message)
return false
}

if topLevel.Status == cmmeta.ConditionFalse {
IntegrationSinkCondSet.Manage(s).MarkFalse(IntegrationSinkConditionCertificateReady,
IntegrationSinkCertificateNotReady, "Certificate is not ready, "+topLevel.Reason+" Message: "+topLevel.Message)
IntegrationSinkCertificateNotReady, "Certificate is not ready, %s Message: %s", topLevel.Reason, topLevel.Message)
return false
}

Expand All @@ -201,7 +201,7 @@ func (s *IntegrationSinkStatus) SetAddresses(addresses ...duckv1.Addressable) {
// MarkFailedTrustBundlePropagation marks the IntegrationSink's SinkBindingTrustBundlePropagated condition to False with
// the provided reason and message.
func (s *IntegrationSinkStatus) MarkFailedTrustBundlePropagation(reason, message string) {
IntegrationSinkCondSet.Manage(s).MarkFalse(IntegrationSinkTrustBundlePropagated, reason, message)
IntegrationSinkCondSet.Manage(s).MarkFalse(IntegrationSinkTrustBundlePropagated, reason, "%s", message)
}

// MarkTrustBundlePropagated marks the IntegrationSink's SinkBindingTrustBundlePropagated condition to True.
Expand Down
4 changes: 2 additions & 2 deletions pkg/apis/sources/v1/apiserver_lifecycle.go
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,9 @@ func (s *ApiServerSourceStatus) PropagateDeploymentAvailability(d *appsv1.Deploy
apiserverCondSet.Manage(s).MarkUnknown(ApiServerConditionDeployed, "DeploymentUpdating", "Deployment has %d unavailable replica(s).", d.Status.UnavailableReplicas)
}
} else if cond.Status == corev1.ConditionFalse {
apiserverCondSet.Manage(s).MarkFalse(ApiServerConditionDeployed, cond.Reason, cond.Message)
apiserverCondSet.Manage(s).MarkFalse(ApiServerConditionDeployed, cond.Reason, "%s", cond.Message)
} else if cond.Status == corev1.ConditionUnknown {
apiserverCondSet.Manage(s).MarkUnknown(ApiServerConditionDeployed, cond.Reason, cond.Message)
apiserverCondSet.Manage(s).MarkUnknown(ApiServerConditionDeployed, cond.Reason, "%s", cond.Message)
}
}
}
Expand Down
10 changes: 5 additions & 5 deletions pkg/apis/sources/v1/container_lifecycle.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,11 +80,11 @@ func (s *ContainerSourceStatus) PropagateSinkBindingStatus(status *SinkBindingSt
case cond.Status == corev1.ConditionTrue:
containerCondSet.Manage(s).MarkTrue(ContainerSourceConditionSinkBindingReady)
case cond.Status == corev1.ConditionFalse:
containerCondSet.Manage(s).MarkFalse(ContainerSourceConditionSinkBindingReady, cond.Reason, cond.Message)
containerCondSet.Manage(s).MarkFalse(ContainerSourceConditionSinkBindingReady, cond.Reason, "%s", cond.Message)
case cond.Status == corev1.ConditionUnknown:
containerCondSet.Manage(s).MarkUnknown(ContainerSourceConditionSinkBindingReady, cond.Reason, cond.Message)
containerCondSet.Manage(s).MarkUnknown(ContainerSourceConditionSinkBindingReady, cond.Reason, "%s", cond.Message)
default:
containerCondSet.Manage(s).MarkUnknown(ContainerSourceConditionSinkBindingReady, cond.Reason, cond.Message)
containerCondSet.Manage(s).MarkUnknown(ContainerSourceConditionSinkBindingReady, cond.Reason, "%s", cond.Message)
}

// Propagate SinkBindings AuthStatus to containersources AuthStatus
Expand All @@ -101,9 +101,9 @@ func (s *ContainerSourceStatus) PropagateReceiveAdapterStatus(d *appsv1.Deployme
if cond.Status == corev1.ConditionTrue {
containerCondSet.Manage(s).MarkTrue(ContainerSourceConditionReceiveAdapterReady)
} else if cond.Status == corev1.ConditionFalse {
containerCondSet.Manage(s).MarkFalse(ContainerSourceConditionReceiveAdapterReady, cond.Reason, cond.Message)
containerCondSet.Manage(s).MarkFalse(ContainerSourceConditionReceiveAdapterReady, cond.Reason, "%s", cond.Message)
} else if cond.Status == corev1.ConditionUnknown {
containerCondSet.Manage(s).MarkUnknown(ContainerSourceConditionReceiveAdapterReady, cond.Reason, cond.Message)
containerCondSet.Manage(s).MarkUnknown(ContainerSourceConditionReceiveAdapterReady, cond.Reason, "%s", cond.Message)
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions pkg/apis/sources/v1/ping_lifecycle.go
Original file line number Diff line number Diff line change
Expand Up @@ -123,9 +123,9 @@ func (s *PingSourceStatus) PropagateDeploymentAvailability(d *appsv1.Deployment)
PingSourceCondSet.Manage(s).MarkUnknown(PingSourceConditionDeployed, "DeploymentUpdating", "Deployment has %d unavailable replica(s).", d.Status.UnavailableReplicas)
}
} else if cond.Status == corev1.ConditionFalse {
PingSourceCondSet.Manage(s).MarkFalse(PingSourceConditionDeployed, cond.Reason, cond.Message)
PingSourceCondSet.Manage(s).MarkFalse(PingSourceConditionDeployed, cond.Reason, "%s", cond.Message)
} else if cond.Status == corev1.ConditionUnknown {
PingSourceCondSet.Manage(s).MarkUnknown(PingSourceConditionDeployed, cond.Reason, cond.Message)
PingSourceCondSet.Manage(s).MarkUnknown(PingSourceConditionDeployed, cond.Reason, "%s", cond.Message)
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions pkg/apis/sources/v1/sinkbinding_lifecycle.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ func (sbs *SinkBindingStatus) InitializeConditions() {
// MarkBindingUnavailable marks the SinkBinding's Ready condition to False with
// the provided reason and message.
func (sbs *SinkBindingStatus) MarkBindingUnavailable(reason, message string) {
sbCondSet.Manage(sbs).MarkFalse(SinkBindingConditionAvailable, reason, message)
sbCondSet.Manage(sbs).MarkFalse(SinkBindingConditionAvailable, reason, "%s", message)
}

// MarkBindingAvailable marks the SinkBinding's Ready condition to True.
Expand All @@ -99,7 +99,7 @@ func (sbs *SinkBindingStatus) MarkBindingAvailable() {
// MarkFailedTrustBundlePropagation marks the SinkBinding's SinkBindingTrustBundlePropagated condition to False with
// the provided reason and message.
func (sbs *SinkBindingStatus) MarkFailedTrustBundlePropagation(reason, message string) {
sbCondSet.Manage(sbs).MarkFalse(SinkBindingTrustBundlePropagated, reason, message)
sbCondSet.Manage(sbs).MarkFalse(SinkBindingTrustBundlePropagated, reason, "%s", message)
}

// MarkTrustBundlePropagated marks the SinkBinding's SinkBindingTrustBundlePropagated condition to True.
Expand Down
6 changes: 3 additions & 3 deletions pkg/apis/sources/v1alpha1/integration_lifecycle.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,11 @@ func (s *IntegrationSourceStatus) PropagateContainerSourceStatus(status *v1.Cont
case cond.Status == corev1.ConditionTrue:
IntegrationCondSet.Manage(s).MarkTrue(IntegrationSourceConditionContainerSourceReady)
case cond.Status == corev1.ConditionFalse:
IntegrationCondSet.Manage(s).MarkFalse(IntegrationSourceConditionContainerSourceReady, cond.Reason, cond.Message)
IntegrationCondSet.Manage(s).MarkFalse(IntegrationSourceConditionContainerSourceReady, cond.Reason, "%s", cond.Message)
case cond.Status == corev1.ConditionUnknown:
IntegrationCondSet.Manage(s).MarkUnknown(IntegrationSourceConditionContainerSourceReady, cond.Reason, cond.Message)
IntegrationCondSet.Manage(s).MarkUnknown(IntegrationSourceConditionContainerSourceReady, cond.Reason, "%s", cond.Message)
default:
IntegrationCondSet.Manage(s).MarkUnknown(IntegrationSourceConditionContainerSourceReady, cond.Reason, cond.Message)
IntegrationCondSet.Manage(s).MarkUnknown(IntegrationSourceConditionContainerSourceReady, cond.Reason, "%s", cond.Message)
}

// Propagate ContainerSources AuthStatus to IntegrationSources AuthStatus
Expand Down
4 changes: 2 additions & 2 deletions pkg/apis/sources/v1beta2/ping_lifecycle.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,9 +110,9 @@ func (s *PingSourceStatus) PropagateDeploymentAvailability(d *appsv1.Deployment)
if cond.Status == corev1.ConditionTrue {
PingSourceCondSet.Manage(s).MarkTrue(PingSourceConditionDeployed)
} else if cond.Status == corev1.ConditionFalse {
PingSourceCondSet.Manage(s).MarkFalse(PingSourceConditionDeployed, cond.Reason, cond.Message)
PingSourceCondSet.Manage(s).MarkFalse(PingSourceConditionDeployed, cond.Reason, "%s", cond.Message)
} else if cond.Status == corev1.ConditionUnknown {
PingSourceCondSet.Manage(s).MarkUnknown(PingSourceConditionDeployed, cond.Reason, cond.Message)
PingSourceCondSet.Manage(s).MarkUnknown(PingSourceConditionDeployed, cond.Reason, "%s", cond.Message)
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/reconciler/broker/trigger/trigger.go
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,7 @@ func (r *Reconciler) propagateDependencyReadiness(ctx context.Context, t *eventi
logging.FromContext(ctx).Infow("The ObjectMeta Generation of dependency is not equal to the observedGeneration of status",
zap.Any("objectMetaGeneration", dependency.GetGeneration()),
zap.Any("statusObservedGeneration", dependency.Status.ObservedGeneration))
t.Status.MarkDependencyUnknown("GenerationNotEqual", "The dependency's metadata.generation, %q, is not equal to its status.observedGeneration, %q.", dependency.GetGeneration(), dependency.Status.ObservedGeneration)
t.Status.MarkDependencyUnknown("GenerationNotEqual", "The dependency's metadata.generation, %d, is not equal to its status.observedGeneration, %d.", dependency.GetGeneration(), dependency.Status.ObservedGeneration)
return nil
}
t.Status.PropagateDependencyStatus(dependency)
Expand Down
2 changes: 1 addition & 1 deletion pkg/reconciler/broker/trigger/trigger_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1483,7 +1483,7 @@ func TestReconcile(t *testing.T) {
WithTriggerStatusSubscriberURI(subscriberURI),
WithTriggerSubscriberResolvedSucceeded(),
WithTriggerDeadLetterSinkNotConfigured(),
WithTriggerDependencyUnknown("GenerationNotEqual", fmt.Sprintf("The dependency's metadata.generation, %q, is not equal to its status.observedGeneration, %q.", currentGeneration, outdatedGeneration)),
WithTriggerDependencyUnknown("GenerationNotEqual", fmt.Sprintf("The dependency's metadata.generation, %d, is not equal to its status.observedGeneration, %d.", currentGeneration, outdatedGeneration)),
WithTriggerOIDCIdentityCreatedSucceededBecauseOIDCFeatureDisabled()),
}},
},
Expand Down
2 changes: 1 addition & 1 deletion pkg/reconciler/eventpolicy/eventpolicy.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ func (r *Reconciler) ReconcileKind(ctx context.Context, ep *v1alpha1.EventPolicy
// and accordingly set the eventpolicy status
subjects, err := auth.ResolveSubjects(r.authResolver, ep)
if err != nil {
ep.Status.MarkSubjectsResolvedFailed("SubjectsNotResolved", err.Error())
ep.Status.MarkSubjectsResolvedFailed("SubjectsNotResolved", "%s", err.Error())
return fmt.Errorf("failed to resolve .spec.from[].ref: %w", err)
}
ep.Status.MarkSubjectsResolvedSucceeded()
Expand Down
10 changes: 5 additions & 5 deletions pkg/reconciler/inmemorychannel/controller/inmemorychannel.go
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,7 @@ func (r *Reconciler) reconcileChannelService(ctx context.Context, dispatcherName
expected, err := resources.NewK8sService(imc, resources.ExternalService(dispatcherNamespace, dispatcherName))
if err != nil {
logging.FromContext(ctx).Error("failed to create the channel service object", zap.Error(err))
imc.Status.MarkChannelServiceFailed("ChannelServiceFailed", fmt.Sprint("Channel Service failed: ", err))
imc.Status.MarkChannelServiceFailed("ChannelServiceFailed", "Channel Service failed: %v", err)
return nil, err
}

Expand All @@ -436,13 +436,13 @@ func (r *Reconciler) reconcileChannelService(ctx context.Context, dispatcherName
svc, err = r.kubeClientSet.CoreV1().Services(imc.Namespace).Create(ctx, expected, metav1.CreateOptions{})
if err != nil {
logging.FromContext(ctx).Error("failed to create the channel service", zap.Error(err))
imc.Status.MarkChannelServiceFailed("ChannelServiceFailed", fmt.Sprint("Channel Service failed: ", err))
imc.Status.MarkChannelServiceFailed("ChannelServiceFailed", "Channel Service failed: %v", err)
return nil, err
}
return svc, nil
}
logging.FromContext(ctx).Error("Unable to get the channel service", zap.Error(err))
imc.Status.MarkChannelServiceUnknown("ChannelServiceGetFailed", fmt.Sprint("Unable to get the channel service: ", err))
imc.Status.MarkChannelServiceUnknown("ChannelServiceGetFailed", "Unable to get the channel service: %v", err)
return nil, err
} else if !equality.Semantic.DeepEqual(svc.Spec, expected.Spec) {
svc = svc.DeepCopy()
Expand All @@ -451,15 +451,15 @@ func (r *Reconciler) reconcileChannelService(ctx context.Context, dispatcherName
svc, err = r.kubeClientSet.CoreV1().Services(imc.Namespace).Update(ctx, svc, metav1.UpdateOptions{})
if err != nil {
logging.FromContext(ctx).Error("failed to update the channel service", zap.Error(err))
imc.Status.MarkChannelServiceFailed("ChannelServiceFailed", fmt.Sprint("Channel Service failed: ", err))
imc.Status.MarkChannelServiceFailed("ChannelServiceFailed", "Channel Service failed: %v", err)
return nil, err
}
}

// Check to make sure that our IMC owns this service and if not, complain.
if !metav1.IsControlledBy(svc, imc) {
err := fmt.Errorf("inmemorychannel: %s/%s does not own Service: %q", imc.Namespace, imc.Name, svc.Name)
imc.Status.MarkChannelServiceFailed("ChannelServiceFailed", fmt.Sprint("Channel Service failed: ", err))
imc.Status.MarkChannelServiceFailed("ChannelServiceFailed", "Channel Service failed: %v", err)
return nil, err
}
return svc, nil
Expand Down
2 changes: 1 addition & 1 deletion pkg/reconciler/parallel/parallel.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ func (r *Reconciler) ReconcileKind(ctx context.Context, p *v1.Parallel) pkgrecon
channelable, err := r.reconcileChannel(ctx, channelResourceInterface, p, channelObjRef)
if err != nil {
err = fmt.Errorf("failed to reconcile channel %s at step %d: %w", channelName, i, err)
p.Status.MarkChannelsNotReady("ChannelsNotReady", err.Error())
p.Status.MarkChannelsNotReady("ChannelsNotReady", "%s", err.Error())
return err
}
logging.FromContext(ctx).Infof("Reconciled Channel Object: %s/%s %+v", p.Namespace, channelName, channelable)
Expand Down
Loading
Loading