Eventing: Strange effects with wrong apiVersion/kind in SinkBinding subject

Created on 29 Jan 2020  路  4Comments  路  Source: knative/eventing

Describe the bug

When using a subject in a SinkBinding that refers to either a non-podspecable resource (e.g. CronJob:batch/v1beta1) or a faulty resource describption (like Job:batch/v1beta1 instead of Job:batch/v1), then no error is returned, but the status of this binding remains:

status:
  conditions:
  - lastTransitionTime: "2020-01-29T15:09:09Z"
    status: Unknown
    type: Ready

Furthermore, this resource can not be deleted anymore, because the delete operation hangs forever. In addition, a namespace with this faulty sink binding can _also_ not delete (the namespace sticks in "Terminating" status)

Expected behavior

I would expect:

  • A clear error indication describing that the subject specification is wrong. Either as part of the status conditions or, if possible, already by an admission controller when verifying the source.
  • It should be possible to delete such resource again.

    To Reproduce
    Steps to reproduce the behavior.

Just apply

apiVersion: sources.knative.dev/v1alpha1
kind: SinkBinding
metadata:
  name: bind-heartbeat-2
spec:
  subject:
    apiVersion: batch/v1
    # This is wrong, should be Job
    kind: CronJob
    selector:
      matchLabels:
        app: heartbeat-cron
  sink:
    ref:
      apiVersion: serving.knative.dev/v1
      kind: Service
      name: edisplay

Knative release version

Eventing 0.12.0

Additional context

Tried on minikube

kinbug

Most helpful comment

All 4 comments

This issue is stale because it has been open for 90 days with no
activity. It will automatically close after 30 more days of
inactivity. Reopen the issue with /reopen. Mark the issue as
fresh by adding the comment /remove-lifecycle stale.

/remove-lifecycle stale

It sounds like this was fixed with https://github.com/triggermesh/pkg/commit/76b1a0d8134f5a5d4172a8b95b0e6ce47b92c0f7, reopen if you need it

Was this page helpful?
0 / 5 - 0 ratings