* 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>
bumping knative.dev/hack 7556452...0198902:
> 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>
Serving currently uses a fixed constant for the context timeout on reconciliation, which is causing some bad interactions with certain policy webhooks.
Based on feedback on https://github.com/knative/serving/pull/13323 I am hoisting this into a shared variable, so that folks can turn it into a flag, so it is configurable.
I noticed that the finalizer manipulation code was performing a second fetch of the resource from the lister cache to determine the differences in finalizers when the finalizers are being modify immediately above each callsite.
This changes both call sites to simply pass through the "desired finalizers" as a new parameter (instead of assigning them), which lets us use the unmodified resource and avoid the redundant lister cache fetch.
When a callback is registered for a gvk that isn't part of the
handlers that callback is never called since there is no webhook
rule associated with that GVK.
Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com>
Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com>
bumping knative.dev/hack 36b2b3c...7556452:
> 7556452 🎁 Use modscope tool to get info about Go modules (# 223)
> 103cdb3 Default `SIGN_IMAGES` variable to `false` (# 225)
Signed-off-by: Knative Automation <automation@knative.team>
Signed-off-by: Knative Automation <automation@knative.team>
* Make request body available in admission context
Signed-off-by: Andrés Torres <andrest@vmware.com>
* Add newline at the end of file
Signed-off-by: Andrés Torres <andrest@vmware.com>
Signed-off-by: Andrés Torres <andrest@vmware.com>
* WIP: just one option exploration.
Signed-off-by: Ville Aikas <vaikas@chainguard.dev>
* Another option. New signature and new type for configuration.
Signed-off-by: Ville Aikas <vaikas@chainguard.dev>
* Use interfaces and type assertions.
Signed-off-by: Ville Aikas <vaikas@chainguard.dev>
* log custom config with debug.
Signed-off-by: Ville Aikas <vaikas@chainguard.dev>
* Address PR feedback.
Signed-off-by: Ville Aikas <vaikas@chainguard.dev>
Signed-off-by: Ville Aikas <vaikas@chainguard.dev>
`Endpoints` are created asynchronously so it might not exists as soon
as a sertvice is created.
Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com>
Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com>
* allow drainer to be reset
* ensure Reset can be called multiple times
* add comment explaining the use of the channel
* bump tolerance as it flaked in actions
* update godoc
* fix linting and comments
* SetupStaticPublishing and SetupDynamicPublishing returns OpenCensusTracer
* The caller can then call Finish() to properly flush buffered Spans
before shutdown
* Make sure the WithExporterFull checks if the config is nil
* Parse cfg.Backend only if config is not nil
Otherwise proceed futher and let globalOct.closer to be closed which
actually flushes the remaining Spans.
* Provide Tracer type with Shutdown function
* Provide backwards compatible API
* Never return nil Tracer
* Provide SetupPublishingWithDynamicConfigAndInitialValue
* Remove SetupDynamicPublishingWithInitialValue
* Bump min go version to 1.18 & read build SHA from binary
* GitHub Commit ID is really a Git Revision
* update go.sum
* fix spelling
* Address PR feedback
- Use a sync.Once to prevent double parsing
- Support SHA256
- Allow non-SHA revision strings
* Don't include 'unknown' revision value in logs