Commit Graph

19 Commits

Author SHA1 Message Date
Victor Agababov 5ba6c1d101
Change %v to %w in errors and other nits (#1252)
* Change %v to %w in errors and other nits
Other are things I noticed when fixing the main %v->%w conversion

* fold
2020-04-27 15:04:51 -07:00
Victor Agababov 8ddda31a35
Some fixes we did in server upstream to pkg (#1244)
* Some fixes we did in server upstream to pkg

- reduce formatting calls where they are not necessary
- remove casts where they are not necessary
- switch to consts where possible.

* nit

* 1more
2020-04-24 15:03:49 -07: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
Slavomir Kaslev c2a529b1b7 Fix several mishandled errors.Wrap conversions. (#992)
Fixes: e08acb95 (Remove all occurrences of github.com/pkg/errors. (#888))
2020-01-16 08:44:03 -08:00
Markus Thömmes e08acb9512 Remove all occurrences of github.com/pkg/errors. (#888) 2019-12-17 10:41:03 -08:00
Markus Thömmes 56c2594e4f Assorted linting fixes. (#840)
* Remove unused code.

* Remove unneeded loops.

* Remove unneeded Printf calls.

* Use time.Since instead of time.Now().Sub.

* Remove unused values.

* Rename error variable according to conventions.

* Return error last.

* Simplify array allocations.

* Remove leaky ticker.

* Remove Yoda conditions.

* Remove deprecated function to talk to GKE.

* Remove dot import.

* Remove empty critical section and replace with a channel operation.

* Add linter directives to explicitly state wanted weirdness.

* Update deps.

* Fix broken line.
2019-11-01 12:49:12 -07: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 3732de5802 Split secret creation into our reconciler resources style. (#830) 2019-10-29 23:08:11 -07:00
dushyanthsc d02c80dc62 test/webhook-apicoverage: Junit cleanup utility (#719)
Change to add a utility to cleanup Junit test summary files.
2019-09-25 06:06:40 -07:00
Matt Moore e4ac97c252 Update our dependency on K8s libs to 1.15.3 (#686)
With a minimum K8s version of 1.14 (starting in 0.10), 1.15.3 puts us in the center of the +/-1 version window of support.
2019-09-18 13:36:48 -07:00
mattmoor-sockpuppet da722d04a7 Format markdown (#668)
Produced via:
  `prettier --write --prose-wrap=always $(find -name '*.md' | grep -v vendor | grep -v .github)`
/assign mattmoor
2019-09-12 08:22:35 -07:00
Ignacio Cano 62d3aa64b5 Renaming Importer to Source (#662)
* source stats reporter... should be used by well-behaved sources

* public fields

* moving serialization/deserialization of metrics and logging maps to pkg

* nits

* adding UT

* same order

* updates

* sock-puppet

* unregistration problem?

* removing base64 encoding

* removing TODO

* removing config changes... done in another PR

* to properly address the comment

* changing importer to source
2019-09-11 13:16:31 -07:00
dushyanthsc b6f14473ea test/webhook-apicoverage: Add support to produce junit xml results (#651)
This change adds support to webhook apicoverage to produce coverage
results in junit xml format. The change only produces coverage
percentages. This can be used to push the results to end points like
test-grid.

The change also moves all the template files as go-strings as finding
relative paths to these files becomes tricky based on the deployment
environment.
2019-09-11 11:02:30 -07:00
mattmoor-sockpuppet 014d54e62f golang format tools (#637)
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-09-06 07:26:05 -07:00
dushyanthsc a5172fd917 test/webhook-apicoverage: Changing html display to use go templates (#564)
This change changes webhook apicoverage HTML display to use to templates
moving away from current approach of using string buffers

This change does not take display-rules into account as its not being
used at the moment. When there is a use-case the template hanlding needs
to be modified accordingly.
2019-09-05 07:06:06 -07:00
dushyanthsc f0f98c9163 test/webhook-apicoverage: Webhook port fix (#600)
Webhook deployment in test/webhook-apicoverage cannot use port 443 as
it runs as a non-root user. This change configures webhook to use port
8443 instead of 443
2019-08-27 12:06:42 -07:00
mattmoor-sockpuppet 4707aad818 golang format tools (#563)
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-08-07 07:08:56 -07:00
chaodaiG 30a47c2c75 Webhook apicoverage unittest uses Table driven test (#560)
* Webhook apicoverage unittest uses Table driven test

* feedback updates
2019-08-07 07:00:56 -07:00
chaodaiG 74bcad8981 Move webhook apicoverage to knative/pkg (#555)
* add webhook-apicoverage under test

* replacing importing path to pkg/test

* update deps

* feedback updates
2019-08-06 07:16:55 -07:00