Commit Graph

63 Commits

Author SHA1 Message Date
Dave Protasowski 6484377731
update boilerplate date (#2134) 2021-05-28 13:21:29 -07:00
Ben Moss cfc1eed828
Better support for error wrapping with ReconcilerEvents (#2106)
* Fix codegen to work outside GOPATH

* Fix ReconcilerEvent handling of %w format strings

Using fmt.Errorf(...).Error() means we get %w's translated to %v's for
printing
2021-04-26 11:00:40 -07:00
Evan Anderson 728bc4ad4e
Update OWNERS_ALIASES to match autogen in community (#2078) 2021-04-08 07:42:51 -07:00
Francesco Guardiani ca02ef752a
Genreconciler properly generates reconciler for Resources with Status (#2004)
* Fix #2003

Signed-off-by: Francesco Guardiani <francescoguard@gmail.com>

* Removed useless newline

Signed-off-by: Francesco Guardiani <francescoguard@gmail.com>

* Removed useless check

Signed-off-by: Francesco Guardiani <francescoguard@gmail.com>

* Now we don't have any newlines anymore

Signed-off-by: Francesco Guardiani <francescoguard@gmail.com>
2021-01-29 16:18:31 -08:00
Dave Protasowski 14386bb65d
bump k8s deps to v0.18.12 (#1914) 2020-11-17 12:09:52 -08:00
Scott Nichols 826303ca06
use new hack repo (#1858) 2020-10-27 15:38:33 -07:00
Scott Nichols 49103e3170
leverage the go_update_deps method from test-infra (#1792)
* leverage the go_update_deps method from test-infra

* update test-infra
2020-10-09 13:35:21 -07:00
Yanwei Guo 50386ad396
Generate Informer injection for coordination/v1 (#1636) 2020-08-20 11:12:14 -07:00
Ignacio (Nacho) Cano 096656a2d4
generating reconciler for deploymnets (#1502) 2020-07-15 17:45:33 -07:00
Nghia Tran 0a8314b444
Back to tracking master branch of floating deps (#1468) 2020-07-07 12:03:44 -07:00
Nghia Tran 2c1a029eb9
Pin knative.dev/test-infra to release-0.16 (#1458) 2020-06-30 10:00:34 -07:00
Matt Moore 5e60b6f863
Implement the fourth wave of per-reconciler leaderelection. (#1304)
With this, all downstream `// +genreconciler` reconcilers will become leader-aware and expose a model for the typed reconcilers they wrap to themselves become leader-aware.

Detailed design: https://docs.google.com/document/d/1i_QHjQO2T3SNv49xjZLWlivcc0UvZN1Tbw2NKxThkyM/edit#
Issue: https://github.com/knative/pkg/issues/1181
2020-06-21 18:58:26 -07:00
Dave Protasowski caa444033b
use crd & webhook v1 APIs (#1391) 2020-06-19 08:43:25 -07:00
Dave Protasowski 9792d28c61
drop k8s.io/kube-openapi from the tools.go (#1385) 2020-06-17 08:07:24 -07:00
Dave Protasowski 2d1a04d1ff
bump k8s packages to 1.17.6 (#1285)
* include script to bump k8s deps

* ran ./hack/update-k8s-deps.sh

* fix client-go breaking changes

* refactor update-k8s-deps.sh

* bump to k8s v0.17.6
2020-05-27 10:37:59 -07:00
Markus Thömmes 9d7eee1b0b
[POST-RELEASE] Track master branches again. (#1354) 2020-05-26 11:41:50 -07:00
Markus Thömmes 14eb3ae3a5
[RELEASE] Pin test-infra branch to 'release-0.15'. (#1346) 2020-05-19 08:57:57 -07:00
Ian Milligan e8bf7b7f98
Do not cd inside update-codegen (#1305)
It should be safe to assume that these scripts are run from within the target repo.
2020-05-05 17:03:45 -07:00
Ian Milligan 99f815e03d
Use go run to run codegen (#1293)
* Update codegen

* Use go run to run codegen
2020-05-05 14:50:44 -07:00
Chi Zhang 90fc61bae7
Switch to Go modules (#1179)
* test out go modules

* chmod +x *.sh

* revert some changes

* update-deps

* try fixing

* chmod +x

* update

* update test-infra for testing

* test

* test

* update

* no -mod=vendor

* update
2020-04-28 12:43:51 -07:00
Scott Nichols 6b9ee63b4a
adding tools to master in prep for go mod. (#1251)
* adding tools to master in prep for go mod.

* adding tools via update deps.

* import the tools directly

* need the root dir too

* adding gengo tools, dep update.
2020-04-27 12:00:51 -07:00
Scott Nichols 8a6d25b309
Generate reconcilers for resources out of tree. (#1175)
* genreconciler:nonNamespaced

* Adding a force-kinds flag to the reconciler generator to allow us to generate reconcilers for non-owned types.

* force-kinds --> force-genreconciler-kinds

* some minor nits with the generators for non-knative types needed to be removed.

* remove whitespace

Co-authored-by: Nacho Cano <nachoacano@gmail.com>
2020-03-25 11:34:51 -07:00
Matt Moore 73701f1aa5
Add an `--upgrade` flag to `./hack/update-dev.sh` (#1136)
This flag upgrades the list of dependencies that we choose to track at HEAD.
2020-03-02 12:31:52 -08:00
Scott Nichols 72f3cd2bbc
[Genreconciler] Fix group names when client groups differ than their directory name. (#1097)
* looking at annotations for group overrides.

* checkpoint.

* checkpoint

* I think it is correct.

* ok

* trim down the files.

* simulate tekton

* working test out of checkin

* remove test client

* update docs

* and test.

* lint

* it ok

* update codegen
2020-02-18 17:14:59 -08:00
Scott Nichols b317048346
Generate Base Reconciler Code for Injection Based Controllers. (#947)
* adding a reconciler generator to use as the base reconcilers for all of knative.

* mend

* fix tag names.

* use reconciler events

* trying new thing.

* base working reconciler gen

* working cleaned up reconciler generator.

* fix typo

* fix some ordering.

* fix interface path

* fix whitespace

* update deps.

* updates based on feedback.

* Remove core loop.

* reconcilerImpl

* add NewReconciler

* Fix copyright header

* Comment out finalizers

* remove finalizers from generated code.
2020-02-04 10:23:30 -08:00
Dave Protasowski 88d4536182
Conversion Webhook Framework (#993)
* ConversionController implementation

This controller will reconcile target CRDs with the correct
conversion webhook configuration. Specifically, the HTTP path and
CA bundle will be updated.

Additionally, the conversion controller will perform the given
conversions through a hub and spoke model utilizing the
apis.Convertible interface.

* Webhook now can host ConversionControllers

* injection/sharedmain now supports webhook.ConversionControllers

These conversion controllers will be hosted by the webhook that
the sharedmain will start

* support defaulting & include godoc
2020-02-03 08:59:29 -08:00
coryrc d0787646f1
Allow passing arguments to dep in update-deps.sh (#1021) 2020-01-31 11:20:29 -08:00
Scott Nichols 298f22bea6 update boilerplate to use 2020 (#979) 2020-01-07 16:04:51 -08:00
Matt Moore b26ddf762b This should be done directly in Serving, not in knative/pkg. (#946) 2019-12-16 13:19:02 -08:00
Slavomir Kaslev 37e855f81e Update istio.io/client-go version to 1.4.1 (#930)
Update istio.io/client-go and drop our patch for it since it has been upstreamed.
2019-12-13 06:49:54 -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
Slavomir Kaslev ddf3968b65 Migrate pkg to istio.io/client-go apis (#882)
* Add istio api packages from istio.io/api and istio.io/client-go

* Codegen istio client for apis from istio.io/client-go

* Remove our istio apis
2019-11-26 11:41:21 -08:00
Matt Moore 43ca049cdb Reduce the boilerplate for setting up duck.InformerFactory's. (#896)
This augments the injection codegen with the capability to produce a duck.InformerFactory
attached to context for each type that we process.

Now a `duck.InformerFactory` for "Addressable" can be produced by "Get"ing it from the context.

This is triggered by placing `// +genduck` on the type that implements `duck.Implementable`.
2019-11-25 09:57:10 -08:00
Nima Kaviani 4deb5d83d2 move metrics config to pkg (#786)
the observability config is used in other packages including
the sample controller. This commit pulls observability config
into knative.dev/pkg similar to logging config for better reusability.
2019-11-13 06:52:28 -08:00
Matt Moore 6d806b9983 Add support for Selector in tracker.Reference. (#861)
* Add support for Selector in tracker.Reference.

`tracker.Reference` may now optionally replace `Name` with `Selector` to track zero or multiple resources of a particular `apiVersion`, `kind` and `namespace`.

Fixes: https://github.com/knative/pkg/issues/859

* Address code review comments
2019-11-11 07:05:21 -08:00
Matt Moore 285df36be4 Move Destination under knative.dev/pkg/apis/duck/v1. (#851)
Destination sits in a strange versioned directory without a group under APIs.  Destination is in fact part of our duck type space, so it belongs under the `duck` group.  This moves the definition (previously v1alpha1) to `v1` because it is referenced from source types that have been designated `v1`.
2019-11-06 15:59:02 -08:00
Matt Moore 3588ed3e5c Add admissionregistration to our injection codegen (#813) 2019-10-26 12:44:35 -07:00
Dave Protasowski 528ad1c1dd Generate K8s Injection Code (#640)
* update codegen so the fatal error messages are more informative

String representation of an untyped nil is 'nil' so the Fatal messages weren't useful

* generate k8s injection code

* generate apiextensions injection code

* use Fatal & move output paths

* switch from Fatal to Panic

* injection creates a single factory
2019-09-09 12:52:11 -07:00
Matt Moore d29eb5d70c Cut v1 of the duck types. (#615)
The main pieces of interest here are Addressable and Status.

This is a glorified copy/paste of v1beta1 with `s/v1beta1/v1/g`.
2019-08-28 13:49:42 -07:00
Scott Nichols a690d27530 Missed the deepcopy gen for Destination. Fixed. (#567) 2019-08-09 12:50:04 -07:00
chaodaiG 178f4d5456 Use knative.dev/test-infra (#552) 2019-07-31 14:20:43 -07:00
Matt Moore 222dd25986 Migrate pkg to use the knative.dev/pkg import path (#489)
* Manual changes.

* scripted changes.
2019-06-26 13:02:06 -07:00
Matt Moore 139b81e637 Make a small adjustment to hack/update-deps.sh (#465)
This form should be more hospitable to running things to auto-update `knative/pkg` and `knative/test-infra`.

I canaried this change in `knative/sample-controller`, and was able to produce: https://github.com/knative/sample-controller/pull/11
2019-06-14 22:06:44 -07:00
Matt Moore 35bb0fc83b Add code-generation for the various injection stubs. (#438)
This is largely based on work by @n3wscott
2019-06-05 08:50:38 -07:00
Adriano Cunha 678bb6612d Remove OWNERS under /vendor (#432)
These are unnecessary.
2019-06-04 07:44:41 -07:00
Adriano Cunha c0132d9dde Update OWNERS to use OWNERS_ALIASES (#422) 2019-05-29 20:04:33 -07:00
Matt Moore 281cda84ce Move Condition stuff to apis, add a v1beta1 Status. (#361)
This moves the common Condition stuff to apis, and creates a v1beta1 form of Status that uses the Condition it defines (changing this in v1alpha1 is too breaking).

There aren't really any meaningful changes in this PR, mostly reorganization.  Enumerating what I did:
1. Copied `condition_set*.go` to `apis/`,
1. Copied the `Condition` portions of `conditions_types.go` to `apis/`,
1. Copied the balance of `conditions_types.go` to `apis/duck/v1beta1/status_types.go`,
1. Changed the parts of the above to reference things in the appropriate new places,
1. Removed the reflection-based `ConditionsAccessor` stuff, implementing it instead on `duckv1beta1.Status`.
1. Incorporate: https://github.com/knative/pkg/pull/358
2019-04-02 09:51:55 -07:00
Thomas Shafer 916205998d Update verification script and fix generated code. (#353)
Run ./hack/update-codegen.sh
2019-03-29 20:46:53 -07:00
jonjohnsonjr cd278f2d33 Bump k8s deps: 1.11.3 -> 1.12.6 (#310)
* Bump k8s deps: 1.11.3 -> 1.12.6

* ./hack/update-deps.sh

* ./hack/update-codegen.sh
2019-03-14 13:48:45 -07:00
chaodaiG b899d3fdac Make verify-codegen.sh also check /vendor (#180)
Replicated from: https://github.com/knative/serving/pull/2561

Original link: https://github.com/knative/serving/issues/1711`
2018-11-30 12:37:24 -08:00