Skip to content

Commit

Permalink
Fix linter issue
Browse files Browse the repository at this point in the history
  • Loading branch information
creydr committed Aug 28, 2024
1 parent a7f6706 commit 4ffff7f
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions control-plane/pkg/reconciler/sink/kafka_sink.go
Original file line number Diff line number Diff line change
Expand Up @@ -201,10 +201,7 @@ func (r *Reconciler) reconcileKind(ctx context.Context, ks *eventing.KafkaSink)
}

// Get sink configuration.
sinkConfig, err := r.getSinkContractResource(ctx, ks, secret, audience, applyingEventPolicies)
if err != nil {
return statusConditionManager.FailedToResolveConfig(err)
}
sinkConfig := r.getSinkContractResource(ctx, ks, secret, audience, applyingEventPolicies)
statusConditionManager.ConfigResolved()

sinkIndex := coreconfig.FindResource(ct, ks.UID)
Expand Down Expand Up @@ -431,7 +428,7 @@ func (r *Reconciler) setTrustBundles(ct *contract.Contract) error {
return nil
}

func (r *Reconciler) getSinkContractResource(ctx context.Context, kafkaSink *eventingv1alpha1.KafkaSink, secret *corev1.Secret, audience *string, applyingEventPolicies []*v1alpha1.EventPolicy) (*contract.Resource, error) {
func (r *Reconciler) getSinkContractResource(ctx context.Context, kafkaSink *eventingv1alpha1.KafkaSink, secret *corev1.Secret, audience *string, applyingEventPolicies []*v1alpha1.EventPolicy) *contract.Resource {
features := feature.FromContext(ctx)
sinkConfig := &contract.Resource{
Uid: string(kafkaSink.UID),
Expand Down Expand Up @@ -468,5 +465,5 @@ func (r *Reconciler) getSinkContractResource(ctx context.Context, kafkaSink *eve
sinkConfig.Ingress.Audience = *audience
}

return sinkConfig, nil
return sinkConfig
}

0 comments on commit 4ffff7f

Please sign in to comment.