Use CreateChannelServiceName, rather than the same format string in two places.
@@ -219,7 +219,7 @@ func (r *Reconciler) reconcileChannelService(ctx context.Context, imc *v1alpha1.
// We don't do anything with the service because it's status contains nothing useful, so just do
// an existence check. Then below we check the endpoints targeting it.
// We may change this name later, so we have to ensure we use proper addressable when resolving these.
- svc, err := r.serviceLister.Services(imc.Namespace).Get(fmt.Sprintf("%s-kn-channel", imc.Name))
+ svc, err := r.serviceLister.Services(imc.Namespace).Get(resources.CreateChannelServiceName(imc.Name))
if err != nil {
if apierrs.IsNotFound(err) {
svc, err = resources.NewK8sService(imc, resources.ExternalService(r.dispatcherNamespace, r.dispatcherServiceName))
