Commit Graph

117 Commits

Author SHA1 Message Date
Victor Agababov d86a08b1d8
Some more replacements to atomic.* types (#1747)
* Some more replacements to atomic.* types

* fix
2020-09-25 10:54:44 -07:00
Markus Thömmes 5fbbde31b3
Align linters with serving (enables stylecheck and asciicheck) (#1738) 2020-09-23 07:37:40 -07:00
Zbynek Roubalik 2d4efecc6b
bump to k8s 1.18 (#1428)
* bump to k8s 1.18.8

Signed-off-by: Zbynek Roubalik <zroubali@redhat.com>

* plumbing ctx through

Signed-off-by: Zbynek Roubalik <zroubali@redhat.com>

* add more ctx plumbing

Signed-off-by: Zbynek Roubalik <zroubali@redhat.com>

* ctx WithCancel()

Signed-off-by: Zbynek Roubalik <zroubali@redhat.com>
2020-09-11 07:54:00 -07:00
Victor Agababov db51a898b4
Add a test to verify #542 is not an issue (#1646)
Reading #542 I see we miss a test for that use case.
So I added one and the test passes as expected.
Perhaps there was a bug in the jsonpatch library we're using at the time
🤷
2020-08-24 10:52:47 -07:00
chen zhengwei 7660f11876
Add duck type in README.md (#1634)
* Add duck type in README.md

* Update apis/duck/README.md

Co-authored-by: Matt Moore <mattmoor@vmware.com>

* Fix spell error

Co-authored-by: Matt Moore <mattmoor@vmware.com>
2020-08-20 08:20:14 -07:00
Victor Agababov c451e3c37f
Various cleanups around the codebase (#1630)
* Various cleanups around the codebase

- unindent the else after return
- make things private that are not used anywhere
- rearrange params
- etc

* add
2020-08-17 19:11:13 -07:00
Victor Agababov 473bba04ee
Fix comment to ensure we tell the truth to the world (#1601)
* Make sure GetCondition actually returns the condition

otherwise we return the temp object that loop variable points at.

* comment

* fix

* meh

* update
2020-08-10 15:35:05 -07:00
Markus Thömmes bf436d5e55
Remove our copy of the proxy watcher. (#1560) 2020-07-27 16:21:59 -07:00
Ville Aikas cb1281d05c
make the rt error message clearer (#1492) 2020-07-14 16:31:32 -07:00
Ignacio (Nacho) Cano 27fe4e1910
Promoting Binding to v1beta1 (#1483)
* binding to v1beta1

* improving coverage
2020-07-14 08:34:19 -07:00
Matt Moore be5186c170
[master] golang format tools (#1479)
Produced via:
  `gofmt -s -w $(find -path './vendor' -prune -o -path './third_party' -prune -o -name '*.pb.go' -prune -o -type f -name '*.go' -print)`
  `goimports -w $(find -name '*.go' | grep -v vendor | grep -v third_party | grep -v .pb.go | grep -v wire_gen.go)`
/assign n3wscott vagababov
/cc n3wscott vagababov
2020-07-13 09:24:18 -07:00
Alvaro Aleman 22502028e3
Avoid importing apis/duck from apis/duck/<<version>> (#1388) 2020-07-10 17:49:37 -07:00
Markus Thömmes 09d5e09da8
Assorted linting fixes. (#1443) 2020-06-24 12:11:27 -07:00
Weston Haught 602857dcc5
add self to aliases and add reviewers to OWNERS (#1409)
* add self to aliases and add reviewers to OWNERS

* fix typo
2020-06-22 12:30:27 -07:00
Matthias Wessendorf 98f8a949a1
adding constant for annotation (#1424)
* 💄 adding constant for label

Signed-off-by: Matthias Wessendorf <mwessend@redhat.com>

* Update apis/duck/register.go

Co-authored-by: Antoine Cotten <hello@acotten.com>

* Update apis/duck/register.go

Co-authored-by: Antoine Cotten <hello@acotten.com>

Co-authored-by: Antoine Cotten <hello@acotten.com>
2020-06-22 06:58:26 -07:00
Victor Agababov 08a86da47d
User variadic version and remove nil (#1361)
* User variadic version and remove nil

Update duck/status to use new version of UnionMaps

* comment
2020-05-28 12:03:00 -07:00
Victor Agababov 7893fe6758
Fix beta duck conversion & omit conversion if nil (#1359) 2020-05-26 13:52:50 -07:00
Victor Agababov c48d2ebdae
Add Status.Annotations to the conversion workflow (#1357) 2020-05-26 12:46:49 -07:00
Ville Aikas 870993f63e
add Status.Annotations field (#1317)
* add Status.Annotations field

* add to v1beta1 in case folks use those for making roundtripping / conversion work

* forgot to run update-codegen
2020-05-22 14:22:44 -07:00
Victor Agababov f6cfa4c47c
Clean context.TODO in pkg and other minor nits (#1337)
- TODO is for migration, we know we want background there
- other nits
2020-05-15 10:58:02 -07:00
Weston Haught db40bcad49
Simplify the krshaped interface, just use k8s interfaces for TypeMeta and ObjectMeta (#1322)
* simplify the krshaped interface

* switch to the runtime.ObjectKind interface

* update example types
2020-05-14 09:47:00 -07:00
Weston Haught 3769cd27e5
Switch KRShaped interface to retrieve entire condition set (#1307)
* Switch interface to retrieve entire condition set

* fix method under test

* type
2020-05-06 14:53:44 -07:00
Weston Haught 1099bd14ba
Include GetTopLevelConditionType for KRShaped (#1298)
* Include GetHappyConditionType for KRShaped

* Rename to GetTopLevelCondition
2020-05-05 14:22:44 -07:00
Weston Haught 0605de9264
Make example types KRShaped (#1288)
* make pkg example types KRShaped

* Fix comments

* Switch to the ObjectMeta standard accessor

* Keep pointers around
2020-05-05 10:50:44 -07:00
Weston Haught 4a2ba059b0
Create an interface for retrieving duck-type fields (#1275)
* Split KResource into a file. Include an interface.

* Update apis/duck/v1/kresource_type.go

Co-authored-by: Matt Moore <mattmoor@vmware.com>

* type

* rename to KRShaped

Co-authored-by: Matt Moore <mattmoor@vmware.com>
2020-05-04 11:09:43 -07:00
Ville Aikas 1ebb4d56f7
populate the v1alpha1.Hostname from the URI as per the spec (#1264) 2020-04-29 16:34:42 -07:00
Victor Agababov 8ddda31a35
Some fixes we did in server upstream to pkg (#1244)
* Some fixes we did in server upstream to pkg

- reduce formatting calls where they are not necessary
- remove casts where they are not necessary
- switch to consts where possible.

* nit

* 1more
2020-04-24 15:03:49 -07:00
Antoine Cotten 9320e44d1b
Allow retry of informer cache init upon error (#1221)
* Make informer cache initializations retriable on error

If the first initialization fails, allow the informer cache
initialization to get retried at a later point instead of caching the
error.

* Update cache tests

* Rename 'result' type to 'informerCache'
2020-04-17 09:02:48 -07:00
Evan Anderson 0c36abbff9
Move duck typing document to markdown (#1184) 2020-04-07 07:59:00 -07:00
Ignacio (Nacho) Cano 381424b197
add CloudEventAttributes to duckv1.SourceStatus (#1165) 2020-03-20 09:08:22 -07:00
Dave Protasowski d771641c91
Fixed #1057 - Rename ConvertUp/Down to ConvertTo/From (#1122) 2020-02-24 09:44:08 -08:00
Scott Nichols d9a38f13e8
Nil check conditions (#1112)
* Realized a corner case on ordering and False > Unknown states.

* add test with unknown fall through.

* I guess some integartions allow nil happy

* add unit tests for GetMessage and GetReason

* all conditons can be nil.

* Search for unhappy dependents.

* update codegen

* Remove KResource from v1alpha1 ducks.
2020-02-20 11:20:06 -08:00
Matthias Wessendorf d8b36f3593
💄 updating comment on Destination, because it's no longer a domain name, but merely a URI (#1094)
Signed-off-by: Matthias Wessendorf <mwessend@redhat.com>
2020-02-13 23:31:40 -08:00
cshou 1cc3c3e852
Update jsonpatch lib that correctly handle object removal (#1078)
* update jsonpatch lib

* add more patch tests for removal
2020-02-12 08:27:22 -08:00
Scott Nichols 32ea845815
Fix a upconvert with empty url (#1064) 2020-02-07 10:15:14 -08:00
Scott Nichols 87875e3b42
found a defaulting bug in the converter for empty addressables. (#1062) 2020-02-06 17:47:32 -08:00
Victor Agababov 8c2e0012c3
No reason to get parent NS if we're not gonna use it. (#1055)
and add a comment for the public method
2020-02-06 09:42:32 -08:00
Ville Aikas 4ec5e09f71
check KReference namespace matches parent. Allow escape hatch. (#1052) 2020-02-05 08:04:31 -08:00
Victor Agababov 0264117c2b
Some nit cleanups (#1040) 2020-02-03 16:56:30 -08:00
Ville Aikas 95163c65ac
Rename KnativeReference to KReference (#1039) 2020-02-03 12:58:30 -08:00
Ville Aikas d5698e90e2
make namespace optional so existing objects keep working (#1034) 2020-02-02 22:17:30 -08:00
Ville Aikas 99abcc2ff5
add SetDefaults from parent (using context), change Destination to us… (#1031)
* add SetDefaults from parent (using context), change Destination to use KnativeReference

* address pr comments, change address resolver to use kref
2020-02-01 11:59:29 -08:00
Ville Aikas aebcdbd5f3
add KnativeReference (#1030)
* add KnativeReference

* fix copyright year
2020-01-31 13:22:28 -08:00
Dave Protasowski 5ff923b836 conditions were being duplicated since we broke vs. continuing (#1009)
* conditions were being duplicated since we broke vs. continuing

* pr feedback

* butter finger
2020-01-24 07:23:24 -08:00
Dave Protasowski 4e81bc3c32 status.ConvertTo can optionally accept predicates (#1003)
the intent is to allow the inclusion of addition ConditionTypes to be copied over if a
a predicate returns true
2020-01-21 18:29:23 -08:00
Scott Nichols 298f22bea6 update boilerplate to use 2020 (#979) 2020-01-07 16:04:51 -08:00
Ville Aikas 7c7512aecf add ability to opt-out of bindings (#970)
* add ability to opt-out of bindings

* I guess a year changed...

* had opt-in / opt-out backwards

* add unit test for contexts, fix comment

* clarify comments

* remove Binding from method/const names since already in bindings package
2020-01-07 08:56:51 -08:00
Matt Moore 891c2876dd Implement a base library for implementing "Pod Spec"-able bindings. (#915)
This PR adds facilities to make it easier to create both components of a Binding
over "Pod Spec"-able resources.  Rather than rehashing it all here, please look
at `./pkg/webhook/psbinding/README.md` for more details.
2019-12-02 08:58:34 -08:00
grac3gao 46cfce8d99 Add check in informer to make controllers work when process invalid resources (#880)
* #2047 sources-controller can't recover from faulty sink (in eventing)

* #2047 sources-controller can't recover from faulty sink (in eventing)

* add unit test

* change after review

* change after review-2

Co-Authored-By: Victor Agababov <vagababov@gmail.com>
2019-11-26 14:16:21 -08:00
Matt Moore 7325e901c0 Format markdown (#904)
Produced via:
  `prettier --write --prose-wrap=always $(find -name '*.md' | grep -v vendor | grep -v .github)`
/assign n3wscott
2019-11-26 10:28:21 -08:00