mirror of https://github.com/knative/pkg.git
* Bump gomodules.xyz/jsonpatch/v2 from 2.4.0 to 2.5.0 Bumps [gomodules.xyz/jsonpatch/v2](https://github.com/gomodules/jsonpatch) from 2.4.0 to 2.5.0. - [Release notes](https://github.com/gomodules/jsonpatch/releases) - [Changelog](https://github.com/gomodules/jsonpatch/blob/release-2.0/CHANGELOG.md) - [Commits](https://github.com/gomodules/jsonpatch/compare/v2.4.0...v2.5.0) --- updated-dependencies: - dependency-name: gomodules.xyz/jsonpatch/v2 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> * Run ./hack/update-codegen.sh * fix patch unit test --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Dave Protasowski <dprotaso@gmail.com> |
||
---|---|---|
.. | ||
ducktypes | ||
images | ||
v1 | ||
v1alpha1 | ||
v1beta1 | ||
ABOUT.md | ||
OWNERS | ||
README.md | ||
cached.go | ||
cached_test.go | ||
const.go | ||
doc.go | ||
enqueue.go | ||
enqueue_test.go | ||
interface.go | ||
patch.go | ||
patch_test.go | ||
register.go | ||
scale_test.go | ||
typed.go | ||
typed_test.go | ||
unstructured.go | ||
unstructured_test.go | ||
verify.go | ||
verify_test.go |
README.md
Duck Types
Knative leverages duck-typing to interact with resources inside of Kubernetes
without explicit knowledge of the full resource shape. knative/pkg
defines
three duck types that are used throughout Knative: Addressable
, Binding
, and
Source
.
For APIs leveraging ObjectReference
, the context of the resource in question
identifies the duck-type. To enable the case where no ObjectReference
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