[release-1.18] Fix MT Channel based broker when OIDC is enabled#8778
Conversation
fix: extract channel service suffix into constant When OIDC is enabled and https is disabled (i.e. http requests are used) the event receiver is using the host name to determine the name of the channel and fails to do so. An example host name is `broker-kne-trigger-kn-channel.namespace-1.svc.cluster.local`. The channel name here is `broker-kne-trigger` without the suffix `-kn-channel` which was hardcoded in the logic which was creating the channel owned k8 service. The constant `-kn-channel` is now extracted into a common constant in the `channel` package. A conditional check in `ParseChannelFromHost` now checks for the suffix in the host name and removes it if needed. An additional test case was added and existing tests were updated. Issue knative#8705. Signed-off-by: Stanislav Jakuschevskij <sjakusch@redhat.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## release-1.18 #8778 +/- ##
================================================
+ Coverage 52.35% 52.86% +0.50%
================================================
Files 397 397
Lines 24937 19977 -4960
================================================
- Hits 13056 10560 -2496
+ Misses 11090 8626 -2464
Partials 791 791 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
/retest-required |
|
/retest |
|
/retest |
1 similar comment
|
/retest |
|
@twoGiants I dunno what you want to do here - I pulled in required changes from Also with 1.20 coming out this week 1.18 becomes EOL. Unsure if you want to squeeze this in |
|
@twoGiants: The following test failed, say
DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: matzew, twoGiants 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 |
This is a manual cherry-pick of #8727