Commit Graph

10 Commits

Author SHA1 Message Date
Markus Thömmes 5fbbde31b3
Align linters with serving (enables stylecheck and asciicheck) (#1738) 2020-09-23 07:37:40 -07:00
Dave Protasowski caa444033b
use crd & webhook v1 APIs (#1391) 2020-06-19 08:43:25 -07: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
Matt Moore b26ddf762b This should be done directly in Serving, not in knative/pkg. (#946) 2019-12-16 13:19:02 -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
Ville Aikas 944655d6cc fix comment, followup to 911 (#912)
* fix comment, followup to 911

* Update webhook/testing/listers.go

Co-Authored-By: Victor Agababov <vagababov@gmail.com>
2019-11-28 13:49:22 -08:00
Matt Moore 20ef0b737b This has three small table testing changes. (#911)
I'm splitting this off of another change that needed them, the three changes are:

1. Give the PostConditions callbacks in TableRow access to the Reconciler
  resource.  It turns out this is incredibly useful to have the `TableRow`
  program an admission controller and then test that programming by calling
  `Admit()`.

1. Surface the test resources in our webhook "listers", and add the testing
  scheme.

1. Change the `objKey` to only use reflection as a fallback.  The existing logic
  doesn't work properly when a mix of real resources and unstructured.Unstructured
  is used for the same resource.
2019-11-28 11:10:22 -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 d4ce001394 This refactors our core webhook logic to be reconciler-based. (#833)
This is the culmination of a large number of changes to refactor our webhook logic, and adopt a reconciler-based approach to make it resilient to unexected system events (e.g. rogue GCs!).

For more details on how this is consumed, see the new `webhook/README.md`.

Fixes: https://github.com/knative/pkg/issues/782
Closes: https://github.com/knative/pkg/issues/529
Fixes: https://github.com/knative/pkg/issues/450
Related: https://github.com/knative/pkg/issues/141
2019-10-31 10:17:13 -07:00
Matt Moore 0442aed564 Create a new singleton Reconciler for the webhook secret. (#832)
* Create a new singleton Reconciler for the webhook secret.

This change creates a new Reconciler (not yet hooked up) that ensures that the
webhook secret has the appropriate shape.  I call this a "singleton Reconciler"
because this reconciler exists to effectively reconcile a single resource, which
will be a pattern for the webhook's reconcilers.

* Address linter problems
2019-10-30 08:23:13 -07:00