Commit Graph

830 Commits

Author SHA1 Message Date
coryrc 60e39237f6
Pass verbosity level on to klog (#1118)
* Pass verbosity level on to klog

This was left out of #1022

* Missed capitalization
2020-02-24 13:37:08 -08:00
Cong Liu 55831d9ef7
Add an option to specify the selector for psbinding webhook. (#1123) 2020-02-24 13:24:08 -08:00
Dave Protasowski d771641c91
Fixed #1057 - Rename ConvertUp/Down to ConvertTo/From (#1122) 2020-02-24 09:44:08 -08:00
Dave Protasowski 5bc49f27e6
use interfaces when testing conditions so we don't need versioned methods (#1120) 2020-02-24 09:23:08 -08:00
Scott Nichols 8dc3f910f5
Delete ./test/testgenclient after presubmit is finished. (#1121)
* An oversight left the gen test client around and it is causing issues with other automation that did not gen the test client because of deps changes.

* new better way to test codegen
2020-02-24 09:13:08 -08:00
Mike Petersen a2e3b66654
Renews a webhook cert before it expires (#1101)
* Renews a webhook cert before it expires

* Moved checks out of webhook and into certificate

* Updated error messages and others from review

* Updated error messages and changed time comparison

* Added two tests cases for checking expiration

* Fixed issue with missing "." in webhook.go
2020-02-22 12:33:08 -08:00
Scott Nichols 3a272190c3
Found missing forced packages in injection gen. (#1116)
* ctx

* runtime.object

* update codegen
2020-02-21 13:42:07 -08:00
Matt Moore 3bada55aab
Drops the Serving-specific stats reporter logic from knative/pkg (#1114) 2020-02-21 10:02:07 -08:00
Paul Morie 1d60dd6107
Introduce sharedmain.WebhookMain* (#1084) 2020-02-21 07:25:07 -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
Scott Nichols d38e1f8bde
Realized a corner case on ordering and False > Unknown states. (#1110)
* Realized a corner case on ordering and False > Unknown states.

* add test with unknown fall through.
2020-02-20 06:55:06 -08:00
Scott Nichols 5c9bc970ce
Clear falied propagation status of the top level condition if cleared. (#1108) 2020-02-19 21:16:06 -08:00
coryrc a81f50a34e
Backend for improving test logging (#1022)
* Create TLogger, bringing leveled logging to tests

Inspired heavily by go-logr, brings leveled logging to tests while
using the highly reliable zap logger backend to fulfill writing to
multiple log files.

Now that metrics logger has been removed, SetupLoggingFlags() is redundant. Moved to test/logging

* Cleanup TLogger and document

Add TLogger.Collect() to support collecting outcomes (either positive
strings or error types) which will be processed in a subtest upon
completion of the currently-running (sub-)test.

StructuredError prints its output in a more-readable form now.

Call-site should now work for .Log/.Logf-using functions.

Use cancel from NewTLogger instead of t.CleanUp()

Use a zapcore SpewEncoder when writing to testing.T

Means even non-json-encodable structs will get printed to the test log
output, while preserving encodable structured output for other log files.

Removed timestamp from printing to t.Log

* Fix the automatically-detected issues

Spelling, codegen, some coverage (coverage of memory_encoder.go should
not be necessary but the coverage tool is broken and needs to be fixed).

* Increase unit test coverage slightly and fix tiny comment

* Set attribute the way the coverage program wants

* Cleanup based on notes

* Comment cleanup and privitize var

* Mistake; left purposely-failing tests enabled

* Reduce long lines

* Consolidate cleanup code; make variable expressive

* Cleanup and bugfix

Failing functions now tested by having an internal constructor
option to skip calls to t.Fail()/t.FailNow().

Fixed some bugs with internal method errorWithRuntimeCheck and added
tests for it.

Address minor typos from comments.

* Tiny name/optimization fixes
2020-02-19 13:57:05 -08:00
Scott Nichols 5d8a01d12c
Implement strongly typed class reconcilers (#1103)
* Implement strongly typed class reconcilers

* document class filters.

* matt is always right
2020-02-19 08:38:06 -08:00
Evan Anderson 1ad2b11321
Revert "Add support for client TLS to pkg/metrics (#1045)" (#1106)
This reverts commit 945b556708.
2020-02-19 08:20:06 -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
Evan Anderson 945b556708
Add support for client TLS to pkg/metrics (#1045)
* Document the plan for metrics

* Update with issue links

* Update with other @mattmoor comments.

* Address feedback from @anniefu

* Update export address since `localhost` won't work for a DaemonSet.

* Add an explicit action item to migrate Prometheus

* Fix possible (ambiguous) link vs checkbox.

* Fix typo in metrics/README.md

* Add support for client TLS to pkg/metrics

* Address comments from @vagababov and @anniefu

* Finish removing Resource code

* Update name to be shorter and not require a double migration.

* Add tests for opencensus exporting with TLS
2020-02-18 11:04:58 -08:00
Matt Moore 9b3ea736c6
golang format tools (#1102)
Produced via:
  `gofmt -s -w $(find -path './vendor' -prune -o -path './third_party' -prune -o -type f -name '*.go' -print)`
  `goimports -w $(find -name '*.go' | grep -v vendor | grep -v third_party)`
/assign n3wscott
/cc n3wscott
2020-02-18 06:47:59 -08:00
Matt Moore 1cc7b71529
golang format tools (#1099)
Produced via:
  `gofmt -s -w $(find -path './vendor' -prune -o -path './third_party' -prune -o -type f -name '*.go' -print)`
  `goimports -w $(find -name '*.go' | grep -v vendor | grep -v third_party)`
/assign n3wscott
/cc n3wscott
2020-02-17 09:56:10 -08:00
Matthias Wessendorf c9cd4f2956
Updating README for genreconciler (#1100) 2020-02-17 08:35:10 -08:00
savitaashture 0fcde3c27d
Modify TestLogger util function to support for Benchmark testing (#1074)
* Modify TestLogger util function to support for Benchmark type

* fix review comment

* fix review comment
2020-02-17 06:52:09 -08:00
Scott Nichols 69f70e37d9
adding recorder to context. (#1096) 2020-02-14 14:28:41 -08:00
Ignacio (Nacho) Cano 68b0ac1c42
Upstreaming Serving filter functions (#1093)
* upstreaming serving filter

* update after code review
2020-02-14 10:43:41 -08:00
chaodaiG d8caefc1cd
Default occupy Boskos for long enough time so we don't need to do hea… (#1095)
* Default occupy Boskos for long enough time so we don't need to do heartbeat

* Update testutils/clustermanager/e2e-tests/boskos/boskos.go

Co-Authored-By: Victor Agababov <vagababov@gmail.com>

Co-authored-by: Victor Agababov <vagababov@gmail.com>
2020-02-14 10:07:41 -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
Victor Agababov 91a86d6aec
Add a new tester for distribution (#1092)
that only checks count, since sometimes we care about number of things being
reported and less about their values
2020-02-13 16:56:40 -08:00
Matt Moore df0629984f
Don't call the callback with the lock held (#862) 2020-02-13 13:28:36 -08:00
Matt Moore 3d1ee74415
Auto-update dependencies (#1090)
Produced via:
  `dep ensure -update knative.dev/test-infra`
/assign n3wscott
/cc n3wscott
2020-02-13 10:00:37 -08:00
Scott Nichols 602d92f69b
I screwed up the return for clearFinalizer. (#1089) 2020-02-13 08:35:36 -08:00
Matt Moore 12ca62e262
golang format tools (#1087)
Produced via:
  `gofmt -s -w $(find -path './vendor' -prune -o -path './third_party' -prune -o -type f -name '*.go' -print)`
  `goimports -w $(find -name '*.go' | grep -v vendor | grep -v third_party)`
/assign n3wscott
/cc n3wscott
2020-02-13 08:27:36 -08:00
Scott Nichols 558f848aa0
[GenRec] Keep resource in sync when setting and removing finalizers. (#1086)
* Update the resource if it is patched for finalizer mods to let status update work the first try.

* matt does not like extra :
2020-02-12 17:08:36 -08:00
Scott Nichols d93ce78496
[Reconciler Generators] Adding support for configStore.ToContext (#1085)
* Support optional config maps.

* document configmap stores

* whitespace.

* optionsFns

* review

* check for nil.

* zero trust imports.
2020-02-12 16:10:35 -08:00
Dave Protasowski e3d924ba00
allow filtering on schema.GroupKind (#1080)
* allow filtering on schema.GroupKind

In addition deprecated usage of Filter with the introduction of
FilterGroupVersionKind

* reduce nesting & simplify boolean logic
2020-02-12 12:12:18 -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
Matt Moore d428fbc250
Auto-update dependencies (#1083)
Produced via:
  `dep ensure -update knative.dev/test-infra`
/assign n3wscott
/cc n3wscott
2020-02-12 07:05:22 -08:00
Scott Nichols a447f39709
Document genreconciler. (#1066)
* document genreconcilerwow

* adding docs around how to use the generator and the stubs

* add finalizer details

* googlebot sucks.
2020-02-11 12:42:21 -08:00
Matt Moore 89126ed1f7
Auto-update dependencies (#1073)
Produced via:
  `dep ensure -update knative.dev/test-infra`
/assign n3wscott
/cc n3wscott
2020-02-11 10:37:21 -08:00
Scott Nichols a5517037d3
set the import for sets (#1075) 2020-02-11 07:52:07 -08:00
Matt Moore dddb2d8753
golang format tools (#1072)
Produced via:
  `gofmt -s -w $(find -path './vendor' -prune -o -path './third_party' -prune -o -type f -name '*.go' -print)`
  `goimports -w $(find -name '*.go' | grep -v vendor | grep -v third_party)`
/assign n3wscott
/cc n3wscott
2020-02-11 07:13:07 -08:00
Timur Zununbekov a805892837
Handle wrong apiVersion/kind in SinkBinding subject (#1067)
* Handle case with unavailable subject in psbinding

* Added test for finalizing forbidden subject
2020-02-11 06:09:08 -08:00
Scott Nichols 248c9f0353
fix filtering for reconcilers gen. (#1071) 2020-02-11 05:26:07 -08:00
Scott Nichols 85608a8329
Generate Managed Finalizers for Reconcilers (#1069)
* fix rando issues

* code in the group for finalizer name.

* Use FinalizeKind

* show the Finalizer interface.

* removing isFinalizing

* sync finalizers before calling reconcilekind

* missed the events change.
2020-02-10 19:46:06 -08:00
Kenjiro Nakayama 6a46689984
bump the minimum version to 1.15.1 (#1070)
* bump the minimum version to 1.15.1

Kubernetes 1.15.0 has a bug in openapi and conversion webhook does not
allow to deploy any Knative resources by kubectl.
To avoid hit the issue, this patch bumps the minimum version to
1.15.1.

Please refer to https://github.com/knative/serving/issues/6787 for
more detail.

* Fix unit test
2020-02-10 17:16:07 -08:00
Matt Moore b5cc404c03
Auto-update dependencies (#1068)
Produced via:
  `dep ensure -update knative.dev/test-infra`
/assign n3wscott
/cc n3wscott
2020-02-10 07:23:07 -08:00
Scott Nichols 32ea845815
Fix a upconvert with empty url (#1064) 2020-02-07 10:15:14 -08:00
Matt Moore fef852970f
Auto-update dependencies (#1063)
Produced via:
  `dep ensure -update knative.dev/test-infra`
/assign n3wscott
/cc n3wscott
2020-02-07 07:52: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
Matt Moore 8e404c7c40
golang format tools (#1056)
Produced via:
  `gofmt -s -w $(find -path './vendor' -prune -o -path './third_party' -prune -o -type f -name '*.go' -print)`
  `goimports -w $(find -name '*.go' | grep -v vendor | grep -v third_party)`
/assign n3wscott
/cc n3wscott
2020-02-06 16:57:32 -08:00
Victor Agababov 9072f494c9
add vagababov (#1059) 2020-02-06 11:14:32 -08:00
Victor Agababov 1e31aa840f
Fix the go version tag (#1058)
Per runtime.Version() docs the version might be a commit tag, that is not accepted
by Mako servers.
So fix that to espace more generally.
Period, on the other hand, is now an accepted symbol, so stop translating it.
2020-02-06 10:57:32 -08:00