Commit Graph

1977 Commits

Author SHA1 Message Date
Stavros Kontopoulos 4a80605786
Add health checks (#2671)
* add health checks

* updates

* make probes more flexible

* simplify

* minor

* internal only

* fixes
2023-02-15 23:38:50 +00:00
Rafał Bigaj 33e6b88010
fix: `reconcilerImpl.updateStatus` calculates state difference in debug mode only (#2678)
The state comparison using `kmp.SafeDiff(existing.Status, desired.Status)` in the `reconcilerImpl.updateStatus` method is costly and performed for debug logging purposes.

Issue: https://github.com/knative/pkg/issues/2677
2023-02-15 23:08:51 +00:00
knative-automation c889c5b7e1
upgrade to latest dependencies (#2679)
bumping knative.dev/hack c7cfcb0...d71d569:
  > d71d569 🐛 Location-agnostic sign release (# 268)
  > b674d64 Update community files (# 270)
  > 549c360 Cleanup: remove ioutil for new go version (# 265)
  > 5814be5 Update community files (# 267)

Signed-off-by: Knative Automation <automation@knative.team>
2023-02-13 13:19:52 +00:00
knative-automation fb44e94ccc
Update community files (#2676)
Signed-off-by: Knative Automation <automation@knative.team>
2023-02-10 01:35:52 +00:00
knative-automation decc1cc0ac
Update community files (#2674)
Signed-off-by: Knative Automation <automation@knative.team>
2023-02-07 01:33:46 +00:00
Dave Protasowski 8532ae0645
update OWNERS files to use teams with active members (#2672)
* update OWNERS files to use teams with active members

* add eventing-wg leads as approvers to /apis
2023-02-06 16:58:45 +00:00
Christoph Stäbler 408ad0773f
Make SetDefaults of Destination duck type nil safer (#2670)
Signed-off-by: Christoph Stäbler <cstabler@redhat.com>

Signed-off-by: Christoph Stäbler <cstabler@redhat.com>
2023-01-25 08:36:39 +00:00
knative-automation 247510c00e
upgrade to latest dependencies (#2668)
bumping knative.dev/hack af8745e...c7cfcb0:
  > c7cfcb0 Update community files (# 263)

Signed-off-by: Knative Automation <automation@knative.team>

Signed-off-by: Knative Automation <automation@knative.team>
2023-01-17 18:16:55 +00:00
knative-automation 876c59d039
Update actions (#2667)
Signed-off-by: Knative Automation <automation@knative.team>

Signed-off-by: Knative Automation <automation@knative.team>
2023-01-16 01:44:07 +00:00
knative-automation 8abadb0a3c
Update community files (#2666)
Signed-off-by: Knative Automation <automation@knative.team>

Signed-off-by: Knative Automation <automation@knative.team>
2023-01-13 01:34:51 +00:00
Martin Gencur ecf3863941
Simplify the test/upgrade package (#2663)
* Top-level structure of test execution changed

* Use t.Parallel properly

* Put back passing Log for test purposes

* More changes

* Prevent panic in unit tests

* All tests passing

* Simplify TestSkipAtBackgroundVerification

* Reduce background_verif_test

* Print name of continual test instead of Continual Test XXX

* Simplify sending stop event

* All tests passing

* background_verification_test using t.Fatal

* Remove old stuff

* Remove old comments

* Remove comment

* Properly initialize logger from LogConfig

* Quite early

* Remove backwards compatible Log from Configuration

* Get rid of suiteExecution failed field

* Minor cleanup

* Bring back most of TestSkipAtBackgroundVerification

* Minor syntactic fix

* Remove unused postVerifyContinual field

* Execute OnWait at least once

* Remove redundant close

* Close closeCh after failed Setup phase

* Do not call OnWait at least once

* Put back error message verification

* Unit tests passing with GOMAXPROCS=2

* remove redundant Eventing continual test as this functionality is
  already tested by Serving continual test
* remove redundant ShouldNotBeSkippedTest - this was a normal passing
  test which is already tested elsewhere

* Add a note about GOMAXPROCS and logical CPUs for upgrade tests

* Use completeSuite where no failures are expected

* Create new zaptest.Logger for each sub-test

This will print output on test failure

* Deprecate LogConfig.Config as it is unused

* Rename Parallel/UpgradeDowngrade to Run/Steps

* minor change in comment

* Fix test
2023-01-10 14:46:49 +00:00
knative-automation 50da24e8cf
upgrade to latest dependencies (#2665)
bumping knative.dev/hack 7233e77...af8745e:
  > af8745e Update community files (# 262)
  > cf3796d Upload attestations and print cosign version (# 261)
  > b9801b4 Update community files (# 260)

Signed-off-by: Knative Automation <automation@knative.team>

Signed-off-by: Knative Automation <automation@knative.team>
2023-01-10 14:35:48 +00:00
knative-automation dc20e47212
Update community files (#2664)
Signed-off-by: Knative Automation <automation@knative.team>

Signed-off-by: Knative Automation <automation@knative.team>
2023-01-10 01:34:50 +00:00
Martin Gencur 0274825984
Allow logstream to stream logs from user namespace (#2591)
* Allow logstream to stream logs from user namespace

* When streaming logs from user namespace, disable filtering lines so
all lines are printed.

* Fixes

* Document the Callback type

* Create function New for configuring logstream with additional options

* Re-use function New inside FromNamespaces
2023-01-04 19:34:20 +00:00
Clay Kauzlaric 4fd6eb8652
make ChildName produce valid names (#2660)
* removes trailing "." in addition to "-"
* test checks for valid DNS1123Subdomain now
2022-12-21 23:09:56 +00:00
knative-automation 911b435f02
Update community files (#2661)
Signed-off-by: Knative Automation <automation@knative.team>

Signed-off-by: Knative Automation <automation@knative.team>
2022-12-09 01:35:15 +00:00
knative-automation f4eb77830e
upgrade to latest dependencies (#2658)
bumping knative.dev/hack c12c1bf...7233e77:
  > 7233e77 No more sugar controller in upstream eventing (# 259)

Signed-off-by: Knative Automation <automation@knative.team>

Signed-off-by: Knative Automation <automation@knative.team>
2022-12-06 17:35:13 +00:00
Chris Suszynski 9e943faaef
Removal of Tekton downstream tests (#2654) 2022-12-06 16:13:13 +00:00
knative-automation 05b694ec4d
upgrade to latest dependencies (#2653)
bumping knative.dev/hack de2ff40...c12c1bf:
  > c12c1bf Revert of # 257 (# 258)
  > 6397aac 🐛 Don't use NodeLocalDNS addon (# 257)
  > 2e610ce Update community files (# 256)

Signed-off-by: Knative Automation <automation@knative.team>

Signed-off-by: Knative Automation <automation@knative.team>
2022-11-23 15:47:42 +00:00
Dave Protasowski 242a3d777f
Fix nil pointer deref in drain when it's reset (#2645)
* fix nil pointer in the drainer when it's reset

* fix linter
2022-11-22 18:56:41 +00:00
knative-automation f5c1a03ab4
Update community files (#2641)
Signed-off-by: Knative Automation <automation@knative.team>

Signed-off-by: Knative Automation <automation@knative.team>
2022-11-17 01:36:41 +00:00
knative-automation bd66b9bfe4
upgrade to latest dependencies (#2640)
bumping knative.dev/hack b035462...de2ff40:
  > de2ff40 Allow tests to skip dumping resources on failure (# 255)
  > 646aac0 e2e script tweaks (# 252)
  > d470f52 Format go code (# 253)

Signed-off-by: Knative Automation <automation@knative.team>

Signed-off-by: Knative Automation <automation@knative.team>
2022-11-16 13:56:39 +00:00
Dave Protasowski dca788a951
Min K8s version is now 1.24 (#2639)
* bump k8s deps to the latest patch

* bump min version of k8s to 1.24
2022-11-15 19:27:37 +00:00
knative-automation 6255ebdec7
upgrade to latest dependencies (#2638)
bumping knative.dev/hack 8f3c705...b035462:
  > b035462 Calculate Image references properly (# 251)
  > 1ba176e Trap calls are now executed in LIFO order (# 249)

Signed-off-by: Knative Automation <automation@knative.team>

Signed-off-by: Knative Automation <automation@knative.team>
2022-11-15 14:10:38 +00:00
Martin Gencur 0243d64135
Function AllowRestrictedPodSecurityStandard for modifying test pods (#2625)
* Function AllowRestrictedPodSecurityStandard for modifying test pods

* Add license

* Format license

* Extract IsRestrictedPodSecurityEnforced which can be run separately
2022-11-07 17:11:17 +00:00
knative-automation 389f811cea
upgrade to latest dependencies (#2629)
bumping knative.dev/hack 9d2ae47...8f3c705:
  > 8f3c705 Update community files (# 247)
  > 62b15bd drop support for the istio add on flag (# 243)
  > f5be74f Update community files (# 245)
  > 80fd6da KO_DATA_PATH doesn't need to be set anymore (# 244)
  > 4b6bd86 Format go code (# 239)
  > 566898d Update community files (# 242)

Signed-off-by: Knative Automation <automation@knative.team>

Signed-off-by: Knative Automation <automation@knative.team>
2022-11-04 15:52:04 +00:00
knative-automation 918fd9396a
Update community files (#2633)
Signed-off-by: Knative Automation <automation@knative.team>

Signed-off-by: Knative Automation <automation@knative.team>
2022-11-04 01:38:05 +00:00
Dave Protasowski 44d1d7d978
Go1.19 changes (#2631)
* run goimports

* ignore linter errors for now

* fix boilerplate
2022-11-03 22:34:05 +00:00
knative-automation 6718478e1e
Update community files (#2628)
Signed-off-by: Knative Automation <automation@knative.team>

Signed-off-by: Knative Automation <automation@knative.team>
2022-11-03 01:36:08 +00:00
Vincent Demeester dc1fae1337
changeset: allow override the revision through ldflags (#2601)
The main reason for this is to support cases where the `go build`
happens on a non git folder but we want to pass a revision anyway.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2022-11-02 20:10:08 +00:00
Matt Moore 92ed919344
Fix: Mute the linter on error return values. (#2627)
🐛 My previous change has revive/stylecheck warnings because I made the `warn` return value `[]error` and it wants the `error` last, which is kind of silly.

This mutes the linter on this signature, since it hits both revive and stylecheck

/kind bug
2022-11-02 19:46:06 +00:00
Dave Protasowski 8fa1a3f55b
CmpOpts overrides should be passed through (#2621) 2022-11-01 14:38:11 +00:00
Dave Protasowski 64fc3e502d
ListPointer flag should also apply to filtered informers (#2620) 2022-11-01 14:38:05 +00:00
Matt Moore 2f194914a4
Feature: Implement Apply codegen. (#2624)
🎁 Now that the K8s client libraries have an Apply method for the dynamic client, plumb it through the client code generation.

/kind feature
2022-10-31 20:24:13 +00:00
knative-automation 6eb8f1845a
Update community files (#2626)
Signed-off-by: Knative Automation <automation@knative.team>

Signed-off-by: Knative Automation <automation@knative.team>
2022-10-31 13:22:15 +00:00
Evan Anderson 5cbee02332
Filter reactor FieldErrors on validation to only error-level alerts. (#2611) 2022-10-29 20:00:09 +00:00
Matt Moore 198b463706
Cleanup: Turn multiple warnings into multiple warnings. (#2619)
🧹 Previously we lacked a public method for turning our `apis.FieldError` multi-error into a list of constituent error messages, so when we turned things into a webhook warning we simply used the combined serialization of all of the warnings.  Thanks to Nghia's recent change, we can now access the list of warnings to return as a list of errors.

/kind cleanup
2022-10-27 17:34:07 +00:00
Nghia Tran 728dfd8e28
Add FieldError#WrappedErrors to allow dependent code to have access (readonly) (#2618)
* Add FieldError#GetErrors to allow downstream reads

* Rename based on PR feedback

* Rename correctly for real

* Also expose `Normalized`

* WrappedErrors = merge(normalized)
2022-10-27 14:30:07 +00:00
Jonathan Innis 6ce976ce92
Default observability config if nil (#2614) 2022-10-25 20:08:56 +00:00
Dave Protasowski ff956846a1
make METRICS_DOMAIN optional when backend is not OpenCensus (#2617) 2022-10-25 18:42:56 +00:00
knative-automation b2a3a39d92
upgrade to latest dependencies (#2616)
bumping knative.dev/hack 3fdc50b...9d2ae47:
  > 9d2ae47 Update community files (# 241)
  > cf1a127 🎁 Use Knative ls-tags tool (# 238)

Signed-off-by: Knative Automation <automation@knative.team>

Signed-off-by: Knative Automation <automation@knative.team>
2022-10-25 16:07:56 +00:00
knative-automation 9823d960ed
Update community files (#2615)
Signed-off-by: Knative Automation <automation@knative.team>

Signed-off-by: Knative Automation <automation@knative.team>
2022-10-24 01:37:16 +00:00
Dave Protasowski 5dd89c68db
Support istio *List types where Items is an array of pointer types (#2613)
Generally K8s types have a list type where the 'Items' member is an
array of structs.

ie. https://pkg.go.dev/k8s.io/api@v0.25.3/apps/v1#DeploymentList

type DeploymentList struct {
	...
	// Items is the list of Deployments.
	Items []Deployment `json:"items" protobuf:"bytes,2,rep,name=items"`
}

Istio is an exception where the list contains pointers to structs

type GatewayList struct {
	...
	Items       []*Gateway `json:"items" protobuf:"bytes,2,rep,name=items"`
}

To hint that the list types are pointers you can now pass the flag
'--lister-has-pointer-elem'.

Ideally we could infer this info by inspecting the types but
unfortunately the generator doesn't load this information
2022-10-20 14:09:13 +00:00
Kenny Leung b812affa38
Support fetching observability from ctx. (#2610)
* add option to load observability config from ctx

Signed-off-by: Kenny Leung <kleung@chainguard.dev>

* comments and tests

Signed-off-by: Kenny Leung <kleung@chainguard.dev>

* undo

Signed-off-by: Kenny Leung <kleung@chainguard.dev>

* move observability setup logic into function to match logger

Signed-off-by: Kenny Leung <kleung@chainguard.dev>

* fix arg

Signed-off-by: Kenny Leung <kleung@chainguard.dev>

Signed-off-by: Kenny Leung <kleung@chainguard.dev>
2022-10-14 16:45:53 +00:00
knative-automation 714b7630a8
upgrade to latest dependencies (#2609)
bumping knative.dev/hack 52a87e1...3fdc50b:
  > 3fdc50b Remove Signing Feature Gate (# 236)
  > 2d67db5 generate provenances (# 237)

Signed-off-by: Knative Automation <automation@knative.team>

Signed-off-by: Knative Automation <automation@knative.team>
2022-10-11 17:58:52 +00:00
knative-automation 21d3b47e2e
upgrade to latest dependencies (#2608)
bumping knative.dev/hack 7556452...52a87e1:
  > 52a87e1 Update community files (# 235)
  > 92a65f1 don't quote vars referencing files (# 234)
  > b3c9790 Notarize Mac binaries (# 231)
  > 0198902 Format go code (# 226)
  > 7dff557 Update community files (# 233)
  > 6887217 Update community files (# 232)
  > 9b76387 output certificate as well (# 229)
  > d1317b0 errexit and pipefail should remain off until downstream is fixed (# 228)
  > df80419 🐛 Fix for test failures of knative/serving# 13292 (# 227)

Signed-off-by: Knative Automation <automation@knative.team>

Signed-off-by: Knative Automation <automation@knative.team>
2022-10-10 14:30:36 +00:00
Nader Ziada 8178c38717
update k8s to 1.25.2 (#2599) 2022-10-07 21:10:32 +00:00
Pierangelo Di Pilato fb2e4fbaa4
Preserve webhook namespaceSelector.matchLabels (#2605)
* Preserve webhook namespaceSelector.matchLabels

I have a webhook with this definition and the reconciler is
removing the matchLabels field:

Current resource:
```
				  namespaceSelector:
				    matchExpressions:
				    - key: webhooks.knative.dev/exclude
				      operator: DoesNotExist
				  objectSelector:
				    matchLabels:
				      app.kubernetes.io/component: kafka-dispatcher

```

Applied resource:
```
				    namespaceSelector:
				      matchExpressions: [ ]
				      matchLabels:
				        app.kubernetes.io/name: knative-eventing
				    objectSelector:
				      matchLabels:
				        app.kubernetes.io/component: kafka-dispatcher
```

Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com>

* Optimize cases that don't need ensureLabelSelectorRequirements

Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com>

Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com>
2022-10-06 21:14:31 +00:00
knative-automation 5c5da2835a
Update actions (#2607)
Signed-off-by: Knative Automation <automation@knative.team>

Signed-off-by: Knative Automation <automation@knative.team>
2022-10-06 19:02:31 +00:00
knative-automation 1fb3e679f6
Update community files (#2606)
Signed-off-by: Knative Automation <automation@knative.team>

Signed-off-by: Knative Automation <automation@knative.team>
2022-10-06 01:36:30 +00:00