pkg/apis/duck
dependabot[bot] a8e20d9db3
Bump gomodules.xyz/jsonpatch/v2 from 2.4.0 to 2.5.0 (#3154)
* 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>
2025-04-11 13:38:14 +00:00
..
ducktypes Avoid importing apis/duck from apis/duck/<<version>> (#1388) 2020-07-10 17:49:37 -07:00
images Move duck typing document to markdown (#1184) 2020-04-07 07:59:00 -07:00
v1 Update linter config and address lint warnings/failures (#3068) 2024-06-25 14:49:36 +00:00
v1alpha1 Made changes to addressable and address status. (#2713) 2023-04-03 15:12:33 +00:00
v1beta1 Update linter config and address lint warnings/failures (#3068) 2024-06-25 14:49:36 +00:00
ABOUT.md Source validation fixes (#2251) 2021-09-09 09:52:59 -07:00
OWNERS update OWNERS files to use teams with active members (#2672) 2023-02-06 16:58:45 +00:00
README.md Spelling (#1797) 2020-10-18 14:22:57 -07:00
cached.go bump to k8s 1.18 (#1428) 2020-09-11 07:54:00 -07:00
cached_test.go Update linter config and address lint warnings/failures (#3068) 2024-06-25 14:49:36 +00:00
const.go add ability to opt-out of bindings (#970) 2020-01-07 08:56:51 -08:00
doc.go Link to the doc on Duck Typing, which I missed adding before. (#105) 2018-09-28 16:33:22 -07:00
enqueue.go bump to k8s 1.18 (#1428) 2020-09-11 07:54:00 -07:00
enqueue_test.go gofumpt the repo (#3067) 2024-06-25 07:27:07 +00:00
interface.go bump to k8s 1.18 (#1428) 2020-09-11 07:54:00 -07:00
patch.go Bump assorted dependencies (#2140) 2021-06-02 02:50:30 -07:00
patch_test.go Bump gomodules.xyz/jsonpatch/v2 from 2.4.0 to 2.5.0 (#3154) 2025-04-11 13:38:14 +00:00
register.go Fix revive related linting issues (#2131) 2021-05-26 01:10:28 -07:00
scale_test.go Align linters with serving (enables stylecheck and asciicheck) (#1738) 2020-09-23 07:37:40 -07:00
typed.go bump to k8s 1.18 (#1428) 2020-09-11 07:54:00 -07:00
typed_test.go drop fake dynamic client workaround (#2310) 2021-10-13 08:28:48 -07:00
unstructured.go Implement a base library for implementing "Pod Spec"-able bindings. (#915) 2019-12-02 08:58:34 -08:00
unstructured_test.go gofumpt the repo (#3067) 2024-06-25 07:27:07 +00:00
verify.go gofumpt the repo (#3067) 2024-06-25 07:27:07 +00:00
verify_test.go Update linter config and address lint warnings/failures (#3068) 2024-06-25 14:49:36 +00:00

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