src: use Knative Client libraries#167
Conversation
3c52d7e to
d23c3c3
Compare
| } | ||
|
|
||
| err = client.DeleteService(project, time.Second*30) | ||
| err = client.DeleteService(serviceName, time.Second*60) |
Signed-off-by: Zbynek Roubalik <zroubali@redhat.com>
rhuss
left a comment
There was a problem hiding this comment.
Thanks ! In general looks very good, except one place where there is still a dependency on the kn commands themselves. Not sure why this is needed but we should get rid of this.
| @@ -28,16 +66,5 @@ func NewClient(namespace string, verbose bool) (clientservingv1.KnServingClient, | |||
| p.Output = &bytes.Buffer{} | |||
There was a problem hiding this comment.
@rhuss do you know if there's a way how to capture output, if we remove KnParams{} ?
There was a problem hiding this comment.
Let me check tomorrow, but I don't think that the service API prints anything out on its own.
What actuallly do you want to capture ?
There was a problem hiding this comment.
Thanks! If there's nothing to print from the service API, that's easier for us and nothing to capture :)
Signed-off-by: Zbynek Roubalik <zroubali@redhat.com>
|
@rhuss I have updated the PR according to your comments, PTAL :) |
rhuss
left a comment
There was a problem hiding this comment.
Looks good to me, thanks !
/approve
/lgtm
| ) | ||
|
|
||
| func NewClient(namespace string, verbose bool) (clientservingv1.KnServingClient, io.Writer, error) { | ||
| func NewServingClient(namespace string) (clientservingv1.KnServingClient, error) { |
There was a problem hiding this comment.
Looks good ! As a future step we might consider to take over those constructors methods to the knative client, too, so that the user doesn't have to specify the config on her own.
| "time" | ||
|
|
||
| "k8s.io/client-go/tools/clientcmd" | ||
| "knative.dev/client/pkg/kn/commands" |
Signed-off-by: Zbynek Roubalik zroubali@redhat.com
Using Knative Client lib for manipulation with Knative (Serving/Eventing) objects
Fixes: #160