Add probes to IntegrationSource & -Sink deployments#8867
Conversation
|
/cc @simkam |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #8867 +/- ##
==========================================
- Coverage 50.91% 50.63% -0.28%
==========================================
Files 409 409
Lines 21524 21658 +134
==========================================
+ Hits 10958 10966 +8
- Misses 9710 9835 +125
- Partials 856 857 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
/test reconciler-tests |
|
/lgtm |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: creydr, simkam The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
Sorry, the test errors seem related :( |
|
I did some auth-proxy refactoring in #8870. I think this is required for the tests, because this removes the need for redeploying the integrationsink deployment when the policy changes |
4738e72 to
bab60ce
Compare
|
Rebased on #8870 to see whole flow |
|
I'll rebase when #8870 is in |
The auth-proxy container was crashing with "required key SINK_URI missing value" due to a circular dependency in the reconciliation order. The deployment (with auth-proxy) was being created before the IntegrationSink status.Address was set, causing the auth-proxy to fail during startup. This commit fixes the issue by deriving the SINK_URI directly from the sink name and namespace (using network.GetServiceHostname()) instead of reading it from status.Address. This matches how the reconcileAddress() function constructs the URL, but without requiring the status to be set first. The same approach is now used for the SINK_AUDIENCE when OIDC authentication is enabled. This eliminates the circular dependency and ensures the auth-proxy always has a valid SINK_URI, regardless of reconciliation timing.
bab60ce to
633ae0b
Compare
|
@simkam can you recheck? |
|
/lgtm |
* Add probes to IntegrationSource deployments * Fix auth-proxy SINK_URI missing value error The auth-proxy container was crashing with "required key SINK_URI missing value" due to a circular dependency in the reconciliation order. The deployment (with auth-proxy) was being created before the IntegrationSink status.Address was set, causing the auth-proxy to fail during startup. This commit fixes the issue by deriving the SINK_URI directly from the sink name and namespace (using network.GetServiceHostname()) instead of reading it from status.Address. This matches how the reconcileAddress() function constructs the URL, but without requiring the status to be set first. The same approach is now used for the SINK_AUDIENCE when OIDC authentication is enabled. This eliminates the circular dependency and ensures the auth-proxy always has a valid SINK_URI, regardless of reconciliation timing. * Add readiness check to auth-proxy * Fix unit tests * Use same timings for auth-proxy probes
* Make auth-proxy query EventPolicies dynamically (knative#8870) * Make auth-proxy query EventPolicies dynamically IntegrationSink was baking EventPolicies into the AUTH_POLICIES env var, requiring deployment rollouts whenever policies changed. This caused test failures because old pods with stale policies continued serving traffic during RollingUpdate. Change auth-proxy to query EventPolicies dynamically using a namespace-scoped informer, similar to how Broker and Channel work. This eliminates deployment rollouts when EventPolicies change. - Add knative-eventing-eventpolicy-reader ClusterRole - Create namespace-scoped EventPolicy informer in auth-proxy - Add parent resource env vars to identify which resource to query policies for - Create RoleBinding in sink's namespace for EventPolicy access - Remove AUTH_POLICIES env var from deployment spec - Add test coverage for OIDC-enabled deployments with RoleBindings * Get resync period from context * Use rolebindingLister instead of kubeclient directly * Delete EventPolicy RBAC when OIDC gets disabled * Recreate subjectsWithFilters only on eventPolicy changes * Add probes to IntegrationSource & -Sink deployments (knative#8867) * Add probes to IntegrationSource deployments * Fix auth-proxy SINK_URI missing value error The auth-proxy container was crashing with "required key SINK_URI missing value" due to a circular dependency in the reconciliation order. The deployment (with auth-proxy) was being created before the IntegrationSink status.Address was set, causing the auth-proxy to fail during startup. This commit fixes the issue by deriving the SINK_URI directly from the sink name and namespace (using network.GetServiceHostname()) instead of reading it from status.Address. This matches how the reconcileAddress() function constructs the URL, but without requiring the status to be set first. The same approach is now used for the SINK_AUDIENCE when OIDC authentication is enabled. This eliminates the circular dependency and ensures the auth-proxy always has a valid SINK_URI, regardless of reconciliation timing. * Add readiness check to auth-proxy * Fix unit tests * Use same timings for auth-proxy probes
* [e2e tests] rename integrationsource_test.go to integrationsource_timer_test.go * [e2e tests] use more descriptive source name and sink name variables * [e2e tests] parametrize IntegrationSource type * [e2e tests] fix typos in IntegrationSource tests * [e2e-tests] add test for AWS S3 IntegrationSource * [e2e-tests] add test for AWS SQS IntegrationSource * [e2e-tests] add test for DynamoDB Stream IntegrationSource * [e2e-tests] integrationsource: move "trigger event" to Assert phase * [e2e tests] parametrize IntegrationSink type * [e2e-tests] add test for AWS S3 IntegrationSink * [e2e-tests] add test for AWS SQS IntegrationSink * [e2e-tests] add test for AWS SNS IntegrationSink * [e2e-tests] use long polling to eliminate empty receiveMessage calls for SQS * [e2e-tests] move AWS related code to single place * [e2e-tests] run AWS tests only with e2e_aws tag * [e2e-tests] update README for e2e rekt tests * [e2e-tests] use UUID as primary key for DynamoDB table * [e2e-tests] workaround delayed readiness of ddbstreams source * update-codegen * [e2e-tests] remove workaround for SRVKE-1834 fixed in #8867 * [e2e-tests] move sink/source code to reusable Feature Steps, improve setup and teardown cleanups
* [e2e tests] rename integrationsource_test.go to integrationsource_timer_test.go * [e2e tests] use more descriptive source name and sink name variables * [e2e tests] parametrize IntegrationSource type * [e2e tests] fix typos in IntegrationSource tests * [e2e-tests] add test for AWS S3 IntegrationSource * [e2e-tests] add test for AWS SQS IntegrationSource * [e2e-tests] add test for DynamoDB Stream IntegrationSource * [e2e-tests] integrationsource: move "trigger event" to Assert phase * [e2e tests] parametrize IntegrationSink type * [e2e-tests] add test for AWS S3 IntegrationSink * [e2e-tests] add test for AWS SQS IntegrationSink * [e2e-tests] add test for AWS SNS IntegrationSink * [e2e-tests] use long polling to eliminate empty receiveMessage calls for SQS * [e2e-tests] move AWS related code to single place * [e2e-tests] run AWS tests only with e2e_aws tag * [e2e-tests] update README for e2e rekt tests * [e2e-tests] use UUID as primary key for DynamoDB table * [e2e-tests] workaround delayed readiness of ddbstreams source * update-codegen * [e2e-tests] remove workaround for SRVKE-1834 fixed in knative#8867 * [e2e-tests] move sink/source code to reusable Feature Steps, improve setup and teardown cleanups
* [e2e tests] rename integrationsource_test.go to integrationsource_timer_test.go * [e2e tests] use more descriptive source name and sink name variables * [e2e tests] parametrize IntegrationSource type * [e2e tests] fix typos in IntegrationSource tests * [e2e-tests] add test for AWS S3 IntegrationSource * [e2e-tests] add test for AWS SQS IntegrationSource * [e2e-tests] add test for DynamoDB Stream IntegrationSource * [e2e-tests] integrationsource: move "trigger event" to Assert phase * [e2e tests] parametrize IntegrationSink type * [e2e-tests] add test for AWS S3 IntegrationSink * [e2e-tests] add test for AWS SQS IntegrationSink * [e2e-tests] add test for AWS SNS IntegrationSink * [e2e-tests] use long polling to eliminate empty receiveMessage calls for SQS * [e2e-tests] move AWS related code to single place * [e2e-tests] run AWS tests only with e2e_aws tag * [e2e-tests] update README for e2e rekt tests * [e2e-tests] use UUID as primary key for DynamoDB table * [e2e-tests] workaround delayed readiness of ddbstreams source * update-codegen * [e2e-tests] remove workaround for SRVKE-1834 fixed in knative#8867 * [e2e-tests] move sink/source code to reusable Feature Steps, improve setup and teardown cleanups
* [e2e tests] rename integrationsource_test.go to integrationsource_timer_test.go * [e2e tests] use more descriptive source name and sink name variables * [e2e tests] parametrize IntegrationSource type * [e2e tests] fix typos in IntegrationSource tests * [e2e-tests] add test for AWS S3 IntegrationSource * [e2e-tests] add test for AWS SQS IntegrationSource * [e2e-tests] add test for DynamoDB Stream IntegrationSource * [e2e-tests] integrationsource: move "trigger event" to Assert phase * [e2e tests] parametrize IntegrationSink type * [e2e-tests] add test for AWS S3 IntegrationSink * [e2e-tests] add test for AWS SQS IntegrationSink * [e2e-tests] add test for AWS SNS IntegrationSink * [e2e-tests] use long polling to eliminate empty receiveMessage calls for SQS * [e2e-tests] move AWS related code to single place * [e2e-tests] run AWS tests only with e2e_aws tag * [e2e-tests] update README for e2e rekt tests * [e2e-tests] use UUID as primary key for DynamoDB table * [e2e-tests] workaround delayed readiness of ddbstreams source * update-codegen * [e2e-tests] remove workaround for SRVKE-1834 fixed in knative#8867 * [e2e-tests] move sink/source code to reusable Feature Steps, improve setup and teardown cleanups Co-authored-by: Christoph Stäbler <cstabler@redhat.com>
Currently the deployments of the IntegrationSink & IntegrationSource don't have readiness probes.
This PR addresses it and adds the probes