caching/vendor/knative.dev/pkg/apis/duck
Matt Moore 14ff67345c Auto-update dependencies (#139)
Produced via:
  `dep ensure -update knative.dev/test-infra knative.dev/pkg`
/assign n3wscott
2019-11-25 15:31:20 -08:00
..
v1 Auto-update dependencies (#139) 2019-11-25 15:31:20 -08:00
v1alpha1 Update our dependency on K8s libs to 1.15.3 (#101) 2019-09-18 13:49:54 -07:00
v1beta1 Auto-update dependencies (#128) 2019-11-13 17:19:29 -08:00
README.md Auto-update dependencies (#121) 2019-10-25 13:10:35 -07:00
cached.go Migrate to knative.dev/pkg (#35) 2019-06-26 13:56:06 -07:00
doc.go Migrate to knative.dev/pkg (#35) 2019-06-26 13:56:06 -07:00
enqueue.go Migrate to knative.dev/pkg (#35) 2019-06-26 13:56:06 -07:00
interface.go Migrate to knative.dev/pkg (#35) 2019-06-26 13:56:06 -07:00
patch.go Auto-update dependencies (#100) 2019-09-16 07:20:40 -07:00
proxy.go Migrate to knative.dev/pkg (#35) 2019-06-26 13:56:06 -07:00
register.go Migrate to knative.dev/pkg (#35) 2019-06-26 13:56:06 -07:00
typed.go Auto-update dependencies (#59) 2019-07-28 11:03:05 -07:00
unstructured.go Migrate to knative.dev/pkg (#35) 2019-06-26 13:56:06 -07:00
verify.go Migrate to knative.dev/pkg (#35) 2019-06-26 13:56:06 -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/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

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