Commit Graph

392 Commits

Author SHA1 Message Date
Dave Protasowski 0122abd983 The test logger will now log the correct caller (#63)
Previous, since we weren't skipping, the logged caller
would be 'logging.go'
2018-09-06 14:16:14 -07:00
srinivashegde86 e7a4b0d534 Dont call flag.parse in pkg/test (#62)
* Dont call flag.parse in pkg

* Remove unused import
2018-09-06 10:06:14 -07:00
Adriano Cunha b2135236d0 Update test-infra dependency (#61)
Includes:
* fixes to `library.sh` in order to have some `hack` scripts working again;
* better checking of PRs where presubmit tests are unnecessary;
2018-09-05 06:57:14 -07:00
srinivashegde86 382a2bff0a Make kube_checks generic so that it can be used in serving (#58)
* Make kube_checks generic

* Use logging lib in cleanup
2018-08-31 16:01:12 -07:00
Ville Aikas 760afb6c09 cleanup (#57) 2018-08-30 09:36:12 -07:00
Adriano Cunha eedc0a939d Make verify-codegen.sh compatible with OS X (#54)
OS X's `mktemp` has no `-p` flag.
2018-08-26 08:42:02 -07:00
srinivashegde86 6eff182b87 Remove docker repo from e2e flags (#53) 2018-08-24 13:44:59 -07:00
Adriano Cunha 4be5c07977 Vendor the test-infra scripts (#52)
* shared scripts from test-infra live in //vendor/github.com/knative/test-infra/scripts;
* update `update-deps.sh` to keep only the scripts folder;
* all bash scripts were updated to use the vendored scripts;

Part of knative/test-infra#30.
2018-08-23 21:30:59 -07:00
srinivashegde86 8c687df30f Update WaitForEndpointState to return response (#51)
* Update WaitForEndpointState to return response

* remove extra vars
2018-08-23 13:42:59 -07:00
srinivashegde86 8f6a3be149 Update knative/pkg/test (#50) 2018-08-23 12:03:59 -07:00
Matt Moore 3ca427071d Add a logkey for the reconcile key. (#49)
This adds a logkey.Key for attaching the key being reconciled to a logger we embed into the context passed to Reconcile.  The point of this is to enable us to eliminate [this](928d580756/pkg/reconciler/v1alpha1/service/service.go (L101-L104)) boilerplate from each of the Reconcilers.

These aren't identical, this has the form:
  knative.dev/key: foo/bar

What it's replacing has the form:
  knative.dev/namespace: foo
  serving.knative.dev/service: bar

However, the type information present in the latter is redundant with the controller type that [should already be embedded](928d580756/pkg/reconciler/reconciler.go (L80)) in the logger.
2018-08-23 09:48:59 -07:00
Zhimin Xiang 62d2560a1f Add Istio DestinationRule and Policy into Istio apis and clients (#43)
* initial draft

* fix incorrect dependency on knative/serving

* 1. Move StringMatch from istio/v1alpha3 to istio/common/v1alpha1. 2. Add field excludedPaths into Policy

* fix typo
2018-08-22 16:16:59 -07:00
srinivashegde86 f4a77d7708 Add a common test clients file (#46)
* Add the common test client

* Update vendor dirs

* Add blank lines in boiler plate doc
2018-08-20 16:10:58 -07:00
srinivashegde86 450739d6f8 Add common test logging module (#45)
* Add common test logging module

* Update references to logging lib

* Add error functions
2018-08-20 16:04:59 -07:00
Scott Nichols a3bc2db77a Remove strict name metadata check to be shareable in eventing (#44)
* Do not valdiate name meta for all objects.

* Remove the test too.
2018-08-14 08:45:57 -07:00
srinivashegde86 8bdbf4eeb9 Add the common test e2e files (#39)
* Add the common test e2e files

* Update deps

* Add the constants and remove serving related methods
2018-08-13 11:28:56 -07:00
Matt Moore bc264c290f
Add deepcopy-gen for VolatileTime. (#42) 2018-08-09 16:32:03 -07:00
Matt Moore 7a0c09e11a
Support multiple group/kind contexts in shared webhook. (#41)
In order to have a single webhook support multiple domain contexts, this reworks the `Handlers` argument to embed the `schema.GroupVersion` by wrapping the existing keys with it as a `schema.GroupVersionKind`.

This is mostly straightforward, but one oddity is that I discovered that `AdmissionRequest` gets this same tuple as the less capable `metav1.GroupVersionKind`, so there's a silly conversion we have to do.

I tried this manually vendored in serving with KPA and things worked great.
2018-08-09 16:00:55 -07:00
Matt Moore f2beac9894
Move VolatileTime into knative/pkg (#40) 2018-08-09 15:58:51 -07:00
Matt Moore 3b51a7246c Update to the 1.11 client libraries. (#38) 2018-08-06 09:54:11 -07:00
Scott Andrews a088fee622 Add Istio client from knative/serving (#35)
* Add Istio client from knative/serving

- Add Istio types in 'apis/istio/v1alpha3'
- Update codegen scripts
- Generate client in 'client'
- Add @tcnghia as owner for 'apis/istio'

Fixes #1

* nix linguring serving package dep

* cleanup vendor cache

* Mark /client as generated

* Fix verify-codegen script

* Run verify-codegen.sh via presubmit-tests.sh

* Remove Gatewaies -> Gateway hack

Looks like we don't need it anymore
2018-08-03 16:14:10 -07:00
Scott Nichols 5182837041 flipped the error text around. fixed. (#36) 2018-08-02 13:13:38 -07:00
Scott Nichols c1e9219cee Adding more field errors. (#34)
* Adding mutually exclusive fields error.

* Adding ErrMissingOneOf, ErrMultipleOneOf, ErrInvalidParameterName

* Adding gitignore.

* Change to ErrInvalidKeyName.

* Use ... semantic.

* those pesky newlines.
2018-08-02 10:05:37 -07:00
Matt Moore bf6f9e373f Move our base controller infrastructure into knative/pkg. (#33)
The `controller.go` is from: https://github.com/knative/serving/pull/1770, however, this adds 100% coverage of `controller.go`, which we have been missing in `knative/serving`.

This also adds a `context.Context` to the `Reconcile` signature, to enable better sharing of logger setup across controllers.

Fixes: https://github.com/knative/pkg/issues/8
2018-08-01 14:32:37 -07:00
Matt Moore fdf2fdcd93 Move the test resource out of `./webhook`. (#32)
This is so that other things can more naturally write tests using this same test resource.
2018-07-31 16:02:37 -07:00
Shashwathi bba99e266c Use fallback named logger (#30) 2018-07-31 14:19:37 -07:00
Shashwathi 9a6f5abda8 Use more verbose error msg (#31) 2018-07-31 09:38:37 -07:00
Yanwei Guo 94bc05ad25 Add yanweiguo as owner of logging directory (#29) 2018-07-30 21:34:37 -07:00
Matt Moore 484160f313 Set up issue and PR templates for pkg. (#28)
Fixes: https://github.com/knative/pkg/issues/10
2018-07-30 13:09:36 -07:00
Matt Moore d6c701b0b1 Copy pkg/signals verbatim from Serving. (#25) 2018-07-30 13:05:36 -07:00
Matt Moore 03fb14296d Make the fields of the AdmissionController public. (#24) 2018-07-27 21:27:36 -07:00
Matt Moore 4d4c00734e Pull the webhook from `knative/serving` into `knative/pkg`. (#23)
This pulls the Knative webhook logic (oriented around the interfaces in `knative/pkg/apis`) into `knative/pkg`.

The code is largely copied as-is, with `keep.go` excluded.  The main changes are to the test code, which in `knative/serving` still operate in terms of the serving types.

Fixes: https://github.com/knative/pkg/issues/9
2018-07-27 19:03:36 -07:00
Matt Moore 9d1975b29f Drop the fixed list of `knative/serving` components from logging. (#22) 2018-07-27 10:14:36 -07:00
Matt Moore 8b7b2d7cfb Move the logging packages from serving into pkg. (#21) 2018-07-27 09:53:35 -07:00
Adriano Cunha 16665d8163 Initial set of files for //test (#18)
* Initial set of files for //test

Currently there are no tests, but this will enable finishing setup Prow.

* Add build and unit tests

* Update README with instruction on how to run the unit tests
2018-07-26 16:46:35 -07:00
Matt Moore 84f0a719d7 Add comments to exported error helpers. (#20)
Noticed via the go report!
2018-07-26 16:40:35 -07:00
Matt Moore 63b563207a Add "godoc" and "go report" badges (#19) 2018-07-26 16:39:37 -07:00
Matt Moore 945c05cc41
Bring in the API utilities from `pkg/apis/serving/v1alpha1` used for validation and defaulting in the webhook. (#13)
Fixes: https://github.com/knative/pkg/issues/12
2018-07-26 12:14:57 -07:00
Matt Moore f8e84c0d02
Copy `pkg/configmap` over from `knative/serving`. (#11) 2018-07-25 14:56:29 -07:00
Matt Moore 4e28a4ae07
Copy over some of the core markdown from serving. (#2)
Editted for content.
2018-07-25 10:44:49 -07:00
Matt Moore 198743205e
Add a top-level OWNERS file to pkg. (#6) 2018-07-25 10:43:10 -07:00
DeWitt Clinton 4dbceadaee
Initial commit 2018-07-25 10:16:04 -07:00