PingSource broken when created before the KSVC
- Dominant language
- Go
- Stars
- 1.6k
- Forks
- 631
- Avg merge
- 2d 1h
- Merged PRs (30d)
- 6
Description
**Describe the bug**
create a ping source before a ksvc, and notice that it will _never_ go to `READY` state.
```
pingsource.sources.knative.dev/test-ping-source False NotFound 4m
```
**Expected behavior**
once the `ksvc` is there, it should go to ready state.
**To Reproduce**
1. Install eventing first
1. Creates a pingsource
1. Install Serving
1. Creates a ksvc
1. Creates a new PingSource
1. Creates a new ksvc
1. Notice that none of the PingSources becomes Ready
**Knative release version**
* 0.13
* 0.14
**Additional context**
here is the yamls, I used:
* `ping.yaml`:
```yaml
apiVersion: sources.knative.dev/v1alpha2
kind: PingSource
metadata:
name: test-ping-source
spec:
schedule: "*/2 * * * *"
jsonData: '{"message": "Hello world!"}'
sink:
ref:
apiVersion: serving.knative.dev/v1
kind: Service
name: event-display
```
* `ksvc.yaml`:
```yaml
apiVersion: serving.knative.dev/v1
kind: Service
metadata:
name: event-display
spec:
template:
spec:
containers:
- image: quay.io/openshift-knative/knative-eventing-sources-event-display:v0.13.2
```
* `ping2.yaml`:
```yaml
apiVersion: sources.knative.dev/v1alpha2
kind: PingSource
metadata:
name: test-ping-source2
spec:
schedule: "*/2 * * * *"
jsonData: '{"message": "Hello world!"}'
sink:
ref:
apiVersion: serving.knative.dev/v1
kind: Service
name: event-display2
```
* `ksvc2.yaml`:
```yaml
apiVersion: serving.knative.dev/v1
kind: Service
metadata:
name: event-display2
spec:
template:
spec:
containers:
- image: quay.io/openshift-knative/knative-eventing-sources-event-display:v0.13.2
```
Contributor guide
Research direction
Reproduce the ordering described with ping.yaml and ksvc.yaml: create the PingSource before the Knative Service, then create the Service and inspect whether the source reaches READY. Compare this with ping2.yaml and ksvc2.yaml, and consider the eventing controller path responsible for reconciling the sink reference; done means the earlier PingSource becomes Ready after its target Service exists.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, kubernetes
- Domain
- backend, distributed-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100