Commit Graph

756 Commits

Author SHA1 Message Date
Matt Moore 3588ed3e5c Add admissionregistration to our injection codegen (#813) 2019-10-26 12:44:35 -07:00
Antoine Cotten 839f05b988 Update outdated package paths in injection usage doc (#803) 2019-10-26 09:06:35 -07:00
Antoine Cotten 87d4fd2e4f Log type instead of <nil> in injection panic message (#806) 2019-10-26 09:04:35 -07:00
Scott Nichols cf990bf9e2 Fix name of kntive-gcp, remove build. (#811) 2019-10-25 15:02:35 -07:00
Matt Moore cad41c40cc Stop using OwnerRefs for webhook config lifecycle (#802)
* Stop using OwnerRefs for webhook config lifecycle

This changes the model by which we manage the lifecycle of our
`{mutating,validating}webhookconfiguration`, which previously used an owner ref
from the cluster-scoped configuration to the namespace-scoped Deployment.  The
new model adds an explicit yaml file for the webhook, which omits the fields
filled in by the deployment as it starts.

A few notable elements of this change:
1. Clear out OwnerReferences explicitly (avoids the linked bug),
2. Periodically reruna `Register()` to ensure our webhook exists,
3. Simplified logic around registration (all we need now is update!).

Related: https://github.com/knative/serving/issues/5845

* Incorporate feedback from @dgerd and a few other nits I noticed.
2019-10-25 11:53:35 -07:00
Scott Nichols 878b391a68 duckument the ducktypes. (#808)
* duckument the ducktypes.

* fix status.sinkUri.
2019-10-25 11:23:35 -07:00
Annie Fu f684a1078a Add field to metrics config for configuring Stackdriver exporter client (#794)
* Add field to metrics config for configuring Stackdriver exporter client
options

* Fix test setting global state and interfering with other tests

* Use correct GCP metadata values & cleanup

* Some code cleanup

* Remove as much test-specific function stubbing as possible

* Remove more stubbed out test code

* Make more descriptive error when getting secret

* Use former locking pattern to avoid deadlock

There is a cyclical dependency between the metrics pkg and client-go
kubeclient where the kubeclient will attempt to read the metricsConfig
to record metrics about kubeclient requests. This prevents using a kubeclient within the metricsMux lock.
2019-10-25 10:28:36 -07:00
mattmoor-sockpuppet ba90e86ffa Auto-update dependencies (#805)
Produced via:
  `dep ensure -update knative.dev/test-infra`
/assign mattmoor
2019-10-25 10:16:35 -07:00
Chi Zhang 1709785879 Small fixes of Mako alerter on Github (#796)
* name the parameters of functions in interface

* fix bug in Mako alerter

* repo name on the first line

* add more unit test coverage
2019-10-25 09:42:35 -07:00
mattmoor-sockpuppet 7dc1697d41 golang format tools (#804)
Produced via:
  `gofmt -s -w $(find -path './vendor' -prune -o -type f -name '*.go' -print))`
  `goimports -w $(find -name '*.go' | grep -v vendor)`
/assign mattmoor
2019-10-25 07:08:35 -07:00
Adam Harwayne 2a3fc371d3 Add Destination.GetRef() to abstract out the ref vs deprecated ref. (#801)
* Add Destination.GetRef() to abstract out the ref vs deprecated ref.

* No longer a pointer method.
2019-10-24 15:30:35 -07:00
Ville Aikas 0c92be1883 add method to Destination validation that disallows Deprecated* fields (#800) 2019-10-24 14:58:34 -07:00
capri-xiyue a9458a30c0 add DeprecatedObjectReference in Destination to support backwards compatibility (#790)
* added DeprecatedObjectReference as a field in Destination to support backwards compatible

* updated code-gen

* added four deprecated fields
2019-10-24 12:55:34 -07:00
Yanwei Guo 5118243a77 Add metrics tags length verification (#797)
* add len check

* inline
2019-10-24 10:15:35 -07:00
mattmoor-sockpuppet 15e34cab94 Auto-update dependencies (#798)
Produced via:
  `dep ensure -update knative.dev/test-infra`
/assign mattmoor
2019-10-24 07:17:38 -07:00
Yanwei Guo 4befa47ec5 Change built-in metrics to use internal ones for activator and revision (#795)
* metrics/

* fix tests
2019-10-23 22:19:36 -07:00
mattmoor-sockpuppet dc408b55b7 Auto-update dependencies (#793)
Produced via:
  `dep ensure -update knative.dev/test-infra`
/assign mattmoor
2019-10-23 13:47:36 -07:00
mattmoor-sockpuppet 12ca01312b Format markdown (#792)
Produced via:
  `prettier --write --prose-wrap=always $(find -name '*.md' | grep -v vendor | grep -v .github)`
/assign mattmoor
2019-10-23 13:42:37 -07:00
mattmoor-sockpuppet 2d54fc909d golang format tools (#791)
Produced via:
  `gofmt -s -w $(find -path './vendor' -prune -o -type f -name '*.go' -print))`
  `goimports -w $(find -name '*.go' | grep -v vendor)`
/assign mattmoor
2019-10-23 13:37:29 -07:00
chaodaiG 0b19b4ad91 Add prow-cluster-operation package (#788)
* Add prow-cluster-operation package

* Remove binary committed by accident
2019-10-22 11:19:26 -07:00
chaodaiG f0ffda4667 Add metahelper for reading/writing metadata in Prow (#773)
* Add metahelper for writing metadata in Prow

* Update prow package importing path
2019-10-22 10:29:26 -07:00
Evan Anderson ea367c1342 Add utility methods for api.URL (#785)
* Add IsEmpty and HTTP/HTTPS constructors, simplify tests.

* Simplify remaining construction of URLs in tests with struct initialization.

* Reverse `nonEmpty` since most cases are now non-empty.

* Update initial tests. Also fix a bug in URL.String() and update test.
2019-10-21 19:11:25 -07:00
capri-xiyue 5dcae770a9 change Destination api and addressable resolver, fixed unit tests and… (#774)
* change Destination api and addressable resolver, fixed unit tests and added more unit tests

* make validateDestination visible

* rename error msg, added comments, added unit tests

* reformat error msg and change positive case order

* modified error msg when ref is not valid

* fixed typo
2019-10-21 14:42:25 -07:00
Chi Zhang ba3f47d9e9 move prow and gcs package from test-infra to pkg (#750) 2019-10-21 12:47:25 -07:00
Chi Zhang ac756e07ca remove glog from test/logging (#767) 2019-10-21 12:42:25 -07:00
Chi Zhang fece20797b Enable coverage for test code (#778)
* name the parameters of functions in interface

* enable coverage check for test
2019-10-21 12:37:24 -07:00
Chi Zhang 90c64dc2c9 Add aggregate chart link in the performance issue (#784)
* name the parameters of functions in interface

* also add aggregate chart link in the issue
2019-10-21 09:00:24 -07:00
Matthias Wessendorf 3b77b4c057 Bump YAML library to latest release 🛂 (#765) 2019-10-21 07:32:24 -07:00
Antoine Cotten ec5f5148b8 Do not override log level if component is undefined in logging config (#780)
* Do not override log level if component undefined

* review(vagababov): Remove empty line
2019-10-20 14:14:22 -07:00
Chi Zhang 1331c9178a Add perf test cluster manager (#776)
* name the parameters of functions in interface

* add perf test cluster manager

* fix package path

* fix build error
2019-10-18 23:50:20 -07:00
Annie Fu 66c91bcfa6 Fix race condition when updating Stackdriver exporter (#769)
* Remove race condition between reading updates to config-observability
and updating stackdriver exporter

* Simply isNewExporterRequired if statement

* Remove unused thread-safe versions of functions

* Use a reader-writer lock & add function comment

* Make internal unlocked function names consistent
2019-10-18 13:48:19 -07:00
Chi Zhang b5a8deb92e Modify GKE fake client to make the operations thread-safe (#771)
* name the parameters of functions in interface

* make fake GKE client thread-safe

* remove unrelated change

* address comments
2019-10-17 13:21:17 -07:00
Chi Zhang e04fddc5f7 name the parameters of functions in interface (#770) 2019-10-17 11:18:17 -07:00
Chi Zhang 3f11504864 Some refactors of the pkg/test code (#763)
* some refactors of the pkg/test code

* move clustermanager

* fix unit tests

* address comments

* address feedback

* move clustermanager package

* add comments

* address comment
2019-10-15 23:03:15 -07:00
Chi Zhang 757d7e4c77 Add support for new addons for GKE cluster (#764)
* add all addons for gke so far

* fix tests

* support other addons for gke cluster
2019-10-15 13:10:15 -07:00
Adam Harwayne e76e90e464 jsonTrace errors are retried until the timeout. (#760)
* jsonTrace errors are retried until the timeout.

* Update test/zipkin/util.go

Co-Authored-By: Chi Zhang <chizhg@google.com>
2019-10-15 10:42:17 -07:00
Matthias Wessendorf 2668bdb81a Adding common sourceLabels func (#720)
* Adding common sourceLabels func

* fixing feedback from @mattmoor

* fixing typo
2019-10-15 09:13:32 -07:00
Yanwei Guo 9a71140445 add comment (#761) 2019-10-14 15:29:32 -07:00
Chi Zhang 4b3befdaaa Optimizations for Mako alerter (#759)
* update mako alerter

* revert a small change

* address comments

* revert all %w to %v

* use UTC time

* include benchmark name in Slack alert

* optimize the issue handling logic

* fix recent issue logic

* fix tests

* update comments
2019-10-14 12:17:32 -07:00
Slavomir Kaslev 29642b017b Add RunInformers function (#758)
Add RunInfomers which is similar to the StartInformers function but allows for
users to for informers to finish running.

This function will be mainly used in tests to fix the race described in
knative/serving#5351
2019-10-14 10:02:32 -07:00
chaodaiG 7a2cadb6ad Modify cluster manager lib to make it work better with Prow (#755)
* Consolidate cluster manager lib

* Adjust unit test

* updates based on feedback

* Fixing unit tests

* Use project as string instead of pointer
2019-10-11 16:11:31 -07:00
Victor Agababov 9c320664c8 Add OWNERS to the websocket which was missing before. (#754)
* Add OWNERS to the websocket which was missing before.

Alias it to the controller approvers which seem more or less reasonable

* review
2019-10-09 11:32:13 -07:00
Victor Agababov 8ccafcb6f9 Clean up websocket code a bit. (#753)
* Clean up websocket code a bit.

1. %q are very annoying when actually trying to read logs and the address is obvious.
2. there's no reason to have external error (and we were swallowing the timeout error, should it happen)

* fixes
2019-10-09 09:48:37 -07:00
Chi Zhang 7750c7d435 Support listing all clusters under a project' (#752)
* support listing all clusters under a project'

* address comments

* address comments
2019-10-08 22:41:37 -07:00
Chi Zhang cd902689ab Improve Github alerter for Mako (#748)
* update mako alerter

* revert a small change

* address comments

* revert all %w to %v
2019-10-07 18:12:35 -07:00
Jean-Rémy Bancel e7e9cddb9f Return the error instead of the current no-op. (#751) 2019-10-07 15:59:13 -07:00
grac3gao c119a8065c mako setup (#747) 2019-10-07 10:39:10 -07:00
Jean-Rémy Bancel c3d4edcf0c Handle and retry 'connection reset by peer' errors. (#746) 2019-10-04 14:58:08 -07:00
Chi Zhang 9353a99265 Move GKE basic operations to a separate package (#737)
* move GKE basic operations to a separate package

* trying to fix unit tests...

* fix unit tests

* also move wait out

* move the clustercreaterequest out

* fix unit tests

* Update testutils/gke/request_test.go

Co-Authored-By: mattmoor-sockpuppet <mattmoor+sockpuppet@google.com>

* add a flag to indicate whether it's blocking

* address comments, unit tests pending

* bump up unit tests

* minor changes

* fix unit tests

* get zonal changes back, and a few minor changes

* clean up

* more clean up

* address codereview comments

* fix unit test

* remove project id from the request

* project name is not required

* fix unit tests
2019-10-03 15:39:06 -07:00
Chi Zhang ba09b7e881 fix the token path for perf tests (#745) 2019-10-03 15:14:06 -07:00