diff --git a/pkg/kn/commands/source/apiserver/create.go b/pkg/kn/commands/source/apiserver/create.go index 6b8c34ab80..9687474a87 100644 --- a/pkg/kn/commands/source/apiserver/create.go +++ b/pkg/kn/commands/source/apiserver/create.go @@ -56,7 +56,7 @@ func NewApiServerCreateCommand(p *commands.KnParams) *cobra.Command { } // resolve sink - servingClient, err := p.NewClient(namespace) + servingClient, err := p.NewServingClient(namespace) if err != nil { return err } diff --git a/pkg/kn/commands/source/cronjob/create.go b/pkg/kn/commands/source/cronjob/create.go index 6861dc67ce..bc1fe7087d 100644 --- a/pkg/kn/commands/source/cronjob/create.go +++ b/pkg/kn/commands/source/cronjob/create.go @@ -46,7 +46,7 @@ func NewCronJobCreateCommand(p *commands.KnParams) *cobra.Command { return err } - servingClient, err := p.NewClient(cronSourceClient.namespace) + servingClient, err := p.NewServingClient(cronSourceClient.namespace) if err != nil { return err } diff --git a/pkg/kn/commands/source/cronjob/update.go b/pkg/kn/commands/source/cronjob/update.go index fe53d34aa2..fae013ba50 100644 --- a/pkg/kn/commands/source/cronjob/update.go +++ b/pkg/kn/commands/source/cronjob/update.go @@ -46,7 +46,7 @@ func NewCronJobUpdateCommand(p *commands.KnParams) *cobra.Command { return err } - servingClient, err := p.NewClient(cronSourceClient.namespace) + servingClient, err := p.NewServingClient(cronSourceClient.namespace) if err != nil { return err } diff --git a/pkg/kn/commands/testing_helper.go b/pkg/kn/commands/testing_helper.go index 82eae52ad7..5ad47342c6 100644 --- a/pkg/kn/commands/testing_helper.go +++ b/pkg/kn/commands/testing_helper.go @@ -62,7 +62,7 @@ func CreateSourcesTestKnCommand(cmd *cobra.Command, knParams *KnParams) (*cobra. buf := new(bytes.Buffer) // create fake serving client because the sink of source depends on serving client fakeServing := &fake.FakeServingV1alpha1{&client_testing.Fake{}} - knParams.NewClient = func(namespace string) (v1alpha1.KnServingClient, error) { + knParams.NewServingClient = func(namespace string) (v1alpha1.KnServingClient, error) { return v1alpha1.NewKnServingClient(fakeServing, FakeNamespace), nil } // create fake sources client