knative / knative/client

Improve --sink by adding support for svc kind and other addresables

Open
#1,222 14 comments 0 reactions 1 assignee Claimed by @cardil View on GitHub
kind/feature triage/accepted triage/needs-user-input
Dominant language
Go
Stars
387
Forks
274
Avg merge
1d 6h
Merged PRs (30d)
8

Description

### Feature request

Ability to use any addressable resource for the `--sink` flag (ie Broker, Service, etc..)

### Use case

While fixing an issue in the sample pingsource docs https://github.com/knative/docs/pull/3217

I cant use a short version of `--sink` to specify a normal K8s service, not a ksvc

In this case `event-display` is not a knative service, just a normal `Kind: Service`

A Service is addresable,

Using `--sink service:event-display`
```
❯ kn source ping create test-ping-source \
--namespace pingsource-example \
--schedule "*/1 * * * *" \
--data '{"message": "Hello world!"}' \
--sink service:event-display
Error: unsupported sink prefix: 'service', please use prefix 'ksvc' for knative service
Run 'kn --help' for usage
```

Using `--sink svc:event-display`
```
❯ kn source ping create test-ping-source \
--namespace pingsource-example \
--schedule "*/1 * * * *" \
--data '{"message": "Hello world!"}' \
--sink svc:event-display
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.