client/vendor/knative.dev/pkg/apis/duck
Navid Shaikh 217a813344
Track floating deps at master (#932)
* Track floating deps at master

* Update kn version command
2020-07-15 07:42:32 -07:00
..
ducktypes Track floating deps at master (#932) 2020-07-15 07:42:32 -07:00
v1 Track floating deps at master (#932) 2020-07-15 07:42:32 -07:00
v1alpha1 Update dependencies, pin k8s deps. (#855) 2020-05-26 00:39:49 -07:00
v1beta1 Track floating deps at master (#932) 2020-07-15 07:42:32 -07:00
ABOUT.md [master] Auto-update dependencies (#791) 2020-04-13 02:10:10 -07:00
README.md Vendor eventing v0.11.0 and run tests against it (#546) 2019-12-11 00:21:48 -08:00
cached.go Update dependencies, pin k8s deps. (#855) 2020-05-26 00:39:49 -07:00
const.go migrate to the new eventing legacy client (#621) 2020-01-21 23:15:23 -08:00
doc.go Update serving dependency to 0.8; change all import paths (#368) 2019-08-15 18:09:08 -07:00
enqueue.go Update serving dependency to 0.8; change all import paths (#368) 2019-08-15 18:09:08 -07:00
interface.go Vendor eventing v0.11.0 and run tests against it (#546) 2019-12-11 00:21:48 -08:00
patch.go refactor(source): Update to Knative eventing 0.13.0 (#705) 2020-03-06 13:47:27 -08:00
proxy.go Update serving dependency to 0.8; change all import paths (#368) 2019-08-15 18:09:08 -07:00
register.go Track floating deps at master (#932) 2020-07-15 07:42:32 -07:00
typed.go Vendor eventing v0.11.0 and run tests against it (#546) 2019-12-11 00:21:48 -08:00
unstructured.go Vendor eventing v0.11.0 and run tests against it (#546) 2019-12-11 00:21:48 -08:00
verify.go Track floating deps at master (#932) 2020-07-15 07:42:32 -07:00

README.md

Duck Types

Knative leverages duck-typing to interact with resources inside of Kubernetes without explicit knowlage of the full resource shape. knative/pkg defines two duck types that are used throughout Knative: Addressable and Source.

For APIs leveraging ObjectReference, the context of the resource in question identifies the duck-type. To enable the case where no ObjectRefrence is used, we have labeled the Custom Resource Definition with the duck-type. Those labels are as follows:

Label Duck-Type
duck.knative.dev/addressable=true Addressable
duck.knative.dev/binding=true Binding
duck.knative.dev/source=true Source

Addressable Shape

Addressable is expected to be the following shape:

apiVersion: group/version
kind: Kind
status:
  address:
    url: http://host/path?query

Binding Shape

Binding is expected to be in the following shape:

(with direct subject)

apiVersion: group/version
kind: Kind
spec:
  subject:
    apiVersion: group/version
    kind: SomeKind
    namespace: the-namespace
    name: a-name

(with indirect subject)

apiVersion: group/version
kind: Kind
spec:
  subject:
    apiVersion: group/version
    kind: SomeKind
    namespace: the-namespace
    selector:
      matchLabels:
        key: value

Source Shape

Source is expected to be in the following shape:

(with ref sink)

apiVersion: group/version
kind: Kind
spec:
  sink:
    ref:
      apiVersion: group/version
      kind: AnAddressableKind
      name: a-name
  ceOverrides:
    extensions:
      key: value
status:
  observedGeneration: 1
  conditions:
    - type: Ready
      status: "True"
  sinkUri: http://host

(with uri sink)

apiVersion: group/version
kind: Kind
spec:
  sink:
    uri: http://host/path?query
  ceOverrides:
    extensions:
      key: value
status:
  observedGeneration: 1
  conditions:
    - type: Ready
      status: "True"
  sinkUri: http://host/path?query

(with ref and uri sink)

apiVersion: group/version
kind: Kind
spec:
  sink:
    ref:
      apiVersion: group/version
      kind: AnAddressableKind
      name: a-name
    uri: /path?query
  ceOverrides:
    extensions:
      key: value
status:
  observedGeneration: 1
  conditions:
    - type: Ready
      status: "True"
  sinkUri: http://host/path?query