Commit Graph

1216 Commits

Author SHA1 Message Date
Yanwei Guo f1ee372577
Introduce a StatefulSet type elector builder (#1438)
* do not record for empty metric config

* Revert "do not record for empty metric config"

This reverts commit 539a5e4dbb.

* introduce statefulset builder

* change comment

* address victors comment and capsulation

* make exported func

* Update leaderelection/ordinal_test.go

Co-authored-by: Victor Agababov <vagababov@gmail.com>

* Update leaderelection/ordinal_test.go

Co-authored-by: Victor Agababov <vagababov@gmail.com>

* address comment

* format

* address comment from matt

Co-authored-by: Victor Agababov <vagababov@gmail.com>
2020-06-25 19:26:28 -07:00
Victor Agababov eb05e8dd5b
Various cleanups (#1446)
Thanks @markusthoemmes for the tool :)
2020-06-24 14:04:28 -07:00
Markus Thömmes 09d5e09da8
Assorted linting fixes. (#1443) 2020-06-24 12:11:27 -07:00
Dave Protasowski c99955c477
use apiextensions v1 apis for migrator (#1445) 2020-06-24 11:28:27 -07:00
Dave Protasowski 5be32bbb99
Return TypeMeta as part of the admission response (#1444) 2020-06-24 08:54:27 -07:00
Chi Zhang e0a0d63a9e
Ingore files under benchmark folder (#1441) 2020-06-23 13:46:27 -07:00
Adam Harwayne 5658d93fb0
Add tracecontextb3 HTTPFormats (#1429)
* Add a b3tracecontext.HTTPFormat.

It will utilize either B3 or TraceContext propagation formats coming in (preferring TraceContext) and while sending both.

* hack/update-deps.sh

* PR comments.

* Move to HTTPFormatSequence.

* Remove the struct.

* Allow distinct ingress and egress formats.
2020-06-23 10:35:27 -07:00
Weston Haught aa30bc3ac0
expect resoruces are krshaped by default (#1430) 2020-06-23 10:21:27 -07:00
Murphylu1993 fb0320d928
fix typo (#1436) 2020-06-22 19:45:26 -07:00
peterfeifanchen 291e6d9f55
Fix gcs ListChildrenFiles and ListDirectChildren (#1431)
* Fix gcs ListChildrenFiles and ListDirectChildren

Previous right trim and "/" addition prevented the discovery of
top-level directories under the bucket.

* Resolve review comments
2020-06-22 15:32:26 -07:00
Victor Agababov 76b65072de
Improve manual watcher a bit (#1435)
- remove redundant checks (iterating nil/empty slice works)
- fix comments
- remove duplicate test
- map scale size fix.
2020-06-22 14:39:26 -07:00
Weston Haught 602857dcc5
add self to aliases and add reviewers to OWNERS (#1409)
* add self to aliases and add reviewers to OWNERS

* fix typo
2020-06-22 12:30:27 -07:00
Dave Protasowski 02c28cd5ff
Return TypeMeta as part of the conversion response (#1433)
This is a requirement when adopting CRD v1 APIs
2020-06-22 08:29:27 -07:00
Chi Zhang f0da4c9b6e
add --delete option for the perf-tests tool (#1432) 2020-06-22 08:06:26 -07:00
Matthias Wessendorf 98f8a949a1
adding constant for annotation (#1424)
* 💄 adding constant for label

Signed-off-by: Matthias Wessendorf <mwessend@redhat.com>

* Update apis/duck/register.go

Co-authored-by: Antoine Cotten <hello@acotten.com>

* Update apis/duck/register.go

Co-authored-by: Antoine Cotten <hello@acotten.com>

Co-authored-by: Antoine Cotten <hello@acotten.com>
2020-06-22 06:58:26 -07:00
Matt Moore 5e60b6f863
Implement the fourth wave of per-reconciler leaderelection. (#1304)
With this, all downstream `// +genreconciler` reconcilers will become leader-aware and expose a model for the typed reconcilers they wrap to themselves become leader-aware.

Detailed design: https://docs.google.com/document/d/1i_QHjQO2T3SNv49xjZLWlivcc0UvZN1Tbw2NKxThkyM/edit#
Issue: https://github.com/knative/pkg/issues/1181
2020-06-21 18:58:26 -07:00
Weston Haught bfb5907813
Fix gen-reconciler stub - remove TODOs (#1425)
* fix examples

* keep for non krshaped

* fix codegen
2020-06-19 14:43:25 -07:00
Matt Moore b6a13e2894
Implement the third wave of per-reconciler leaderelection. (#1303)
This lets downstream components enable leaderelection on `WebhookMain*`-based components.

Detailed design: https://docs.google.com/document/d/1i_QHjQO2T3SNv49xjZLWlivcc0UvZN1Tbw2NKxThkyM/edit#
Issue: https://github.com/knative/pkg/issues/1181
2020-06-19 11:26:25 -07:00
Matt Moore bfc0cee945
Implement the second wave of per-reconciler leaderelection (#1302)
* Implement the second wave of per-reconciler leaderelection.

Detailed design: https://docs.google.com/document/d/1i_QHjQO2T3SNv49xjZLWlivcc0UvZN1Tbw2NKxThkyM/edit#
Issue: https://github.com/knative/pkg/issues/1181

* incorporate vagababov feedback

* Improve controller.go coverage
2020-06-19 09:47:25 -07:00
Dave Protasowski caa444033b
use crd & webhook v1 APIs (#1391) 2020-06-19 08:43:25 -07:00
Markus Thömmes c365f7d338
Abort reconcilation on finalizer patch errors. (#1423)
* Abort reconcilation on finalizer patch errors.

This aborts reconcilation if finalizers could not be patched correctly with an error and thus it retries.

We shouldn't start a reconcilation if we haven't been able to correctly add the finalizer first. Otherwise we could get into a weird spot where the resources are created before the finalizer and in a very degenerate case the finalizer wouldn't even be executed. Also, the current code has a bug where if the patch fails the resource coming back from the patch (essentially an empty object) is passed into ReconcileKind, causing headaches.

The same imo goes for removing a finalizer. Failing to remove a finalizer blocks the resource forever, thus we should retry if that happens too.

* Add generated code.
2020-06-19 08:26:25 -07:00
Matt Moore 7df8fc5d77
Implement the first wave of per-reconciler leaderelection. (#1301)
* Implement the first wave of per-reconciler leaderelection.

Detailed design: https://docs.google.com/document/d/1i_QHjQO2T3SNv49xjZLWlivcc0UvZN1Tbw2NKxThkyM/edit#
Issue: https://github.com/knative/pkg/issues/1181

* Feedback from vagababov

* Feedback from yanweiguo

* Drop IsLeaderFor from the LeaderAware interface.

* Moar vagababov nits

* dprotaso feedback

* Add issue comment, error return

* Incorporate dprotaso test feedback
2020-06-18 19:07:25 -07:00
Matt Moore 7a18226dfc
[master] Auto-update dependencies (#1418)
Produced via:
  `./hack/update-deps.sh --upgrade && ./hack/update-codegen.sh`
/assign n3wscott vagababov
/cc n3wscott vagababov
2020-06-18 12:42:25 -07:00
Weston Haught d5043a4332
Groom conditions LastTransitionTime in postprocess (#1403)
* Groom conditions time

* unit test

* unit test fix

* make readme accurate
2020-06-18 11:46:25 -07:00
Evan Anderson b9a30ee123
Update config_test.go and metricstest to support multiple Meters. (#1421) 2020-06-18 10:50:25 -07:00
Victor Agababov 96c250871f
Fix the logging in spood (#1420)
Currently we're getting:
```
Retrying [http://activator-with-cc.default.svc.cluster.local?sleep=100 retrying for DNS error: Get http://activator-with-cc.default.svc.cluster.local?sleep=100: dial tcp: lookup activator-with-cc.default.svc.cluster.local on 10.27.240.10:53: no such host]: %vim test/spoof/spoof.go (MISSING)
```
Which is not cool. So fix it to report proper string.
URL is known to be non-nil here.
2020-06-17 17:28:24 -07:00
Weston Haught 40c7e164cc
Always initialize conditions and set defaults when reconciling (#1402)
* initialize conditions and default.

* update default in unit test

* change var name to status
2020-06-17 12:42:24 -07:00
Victor Agababov 6826f2137c
Reconcile the settings with net/http (#1419)
No need to diverge from the timeout setting.
Also note that maxidle conns are also different from the upstream
2020-06-17 10:50:25 -07:00
Victor Agababov 34c17cc2d5
Make things private that should be so (#1417)
* Make things private that should be so

Make some constants and enums private.
The ones I found to be used elsewhere, I kept public.

* sort
2020-06-17 09:26:24 -07:00
Dave Protasowski 9792d28c61
drop k8s.io/kube-openapi from the tools.go (#1385) 2020-06-17 08:07:24 -07:00
Antoine Cotten ffb929374a
Make Prometheus exporter port configurable via env (#1411) 2020-06-16 16:26:24 -07:00
Antoine Cotten 0d967ff0d8
Clean metrics config tests (#1412)
* Use constants in metrics config tests

* Normalize test cases indentation
2020-06-16 11:09:24 -07:00
jjzeng-seattle e366b8278b
Add a passthrough method RegisterResourceView (#1410)
* Add a passthrough method RegisterResourceView

* gofmt

* Update metrics/exporter.go

Co-authored-by: Evan Anderson <evan.k.anderson@gmail.com>

* Address comments

Co-authored-by: Evan Anderson <evan.k.anderson@gmail.com>
2020-06-16 10:58:24 -07:00
Matt Moore d289d2eef6
[master] Auto-update dependencies (#1413)
Produced via:
  `./hack/update-deps.sh --upgrade && ./hack/update-codegen.sh`
/assign n3wscott vagababov
/cc n3wscott vagababov
2020-06-16 07:51:24 -07:00
Mike Petersen 086ff43956
Allows for webhooks to exclude certain namespaces (#1399)
* Allows for webhooks to exclude certain namspaces

Added a namespaces selector to the mutating webhook configuration which
allows for excluding namespaces from the webhook

Fixes #1379

* Updated skipWebhooks key to skip-webhooks for defaulting and validating
webhooks

* Updated table tests with new label

* Updated key name to webhooks.knative.dev/exclude
2020-06-15 18:11:24 -07:00
Jon Donovan dbd32a77f4
Normalize newlines in webhook example checksum. (#1404)
* Normalize newlines in webhook example checksum.

* Support windows newlines.

* Remove unnecessary non-capturing group.
2020-06-15 15:45:24 -07:00
Markus Thömmes 11d18ec274
Avoid string conversion and surface scanner error. (#1406) 2020-06-15 09:41:24 -07:00
Julian Friedman aec2008e66
Allow hashgen to process multiple files (#1398) 2020-06-14 16:25:23 -07:00
chaodaiG 2ddcfef739
Add list branch function for github util package (#1400)
* Add list branch function for github util package

* Fix unit test
2020-06-11 13:43:22 -07:00
Victor Agababov fef70cc261
Unexport some constants (#1393)
* fix the space issue

* merge shenanigans

* nit and tests

* Unexport some constants that don't seem to be used anywhere
2020-06-09 11:40:32 -07:00
Jeff Grafton 8b0054f5f1
Update boskos dependency to sigs.k8s.io/boskos (#1378)
* Update k8s.io/test-infra/boskos -> sigs.k8s.io/boskos

* Run hack/update-deps.sh
2020-06-09 11:28:32 -07:00
Markus Thömmes f1416d3e62
Only validate ConfigMaps the webhook knows about. (#1395) 2020-06-09 10:29:32 -07:00
Markus Thömmes 30cee1c742
Update release process for go.mod and add more details. (#1369) 2020-06-09 07:17:32 -07:00
Julian Friedman 0c198ddb92
Add SendRaw to websocket client (#1396)
allows using non-gob encodings over the socket
2020-06-09 06:59:32 -07:00
Matt Moore 39a1f43fc0
[master] Auto-update dependencies (#1390)
Produced via:
  `./hack/update-deps.sh --upgrade && ./hack/update-codegen.sh`
/assign n3wscott vagababov
/cc n3wscott vagababov
2020-06-08 08:55:20 -07:00
jpower432 7ed1d4a552
Added common name to cert tmpl (#1384)
* Added common name to cert tmpl

Signed-off-by: Jennifer Power <barnabei.jennifer@gmail.com>

* Added a common name test to TestCreateCert function

* Update webhook/certificates/resources/certs_test.go

Co-authored-by: Victor Agababov <vagababov@gmail.com>

* Update webhook/certificates/resources/certs_test.go

Co-authored-by: Victor Agababov <vagababov@gmail.com>

* Applied changes to improve formatting and style

* Update webhook/certificates/resources/certs_test.go

Co-authored-by: Matt Moore <mattmoor@vmware.com>

* Update webhook/certificates/resources/certs_test.go

Co-authored-by: Matt Moore <mattmoor@vmware.com>

* Added Subject to caParsedCert CommonName check

* Fixed failure message to remove reference to diff

* Update webhook/certificates/resources/certs_test.go

Co-authored-by: Victor Agababov <vagababov@gmail.com>

* Update webhook/certificates/resources/certs_test.go

Co-authored-by: Victor Agababov <vagababov@gmail.com>

* Update webhook/certificates/resources/certs.go

Co-authored-by: Matt Moore <mattmoor@vmware.com>

* Update webhook/certificates/resources/certs.go

Co-authored-by: Matt Moore <mattmoor@vmware.com>

* Update webhook/certificates/resources/certs.go

Co-authored-by: Matt Moore <mattmoor@vmware.com>

Co-authored-by: Victor Agababov <vagababov@gmail.com>
Co-authored-by: Matt Moore <mattmoor@vmware.com>
2020-06-06 15:44:18 -07:00
Thomas Shafer 2266252575
Prevent nil access when resource is nil (#1386)
When an error is returned frequently the resource is nil and results in nil.Name being called for the error.
2020-06-06 12:53:18 -07:00
Victor Agababov b7125260dc
Remove the trailing \n (#1381)
* fix the space issue

* merge shenanigans

* nit and tests
2020-06-05 10:07:18 -07:00
Matt Moore bbf2539aaf
[master] Auto-update dependencies (#1383)
Produced via:
  `./hack/update-deps.sh --upgrade && ./hack/update-codegen.sh`
/assign n3wscott vagababov
/cc n3wscott vagababov
2020-06-05 08:56:18 -07:00
Julian Friedman 7b4093b435
Use annotation rather than label for configmap checksum (#1380) 2020-06-05 04:26:17 -07:00