You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[release-1.19] Fix MT Channel based broker when OIDC is enabled (#8777)
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 #8705.
Signed-off-by: Stanislav Jakuschevskij <[email protected]>
Co-authored-by: Stanislav Jakuschevskij <[email protected]>
WithInMemoryChannelChannelServiceNotReady("ChannelServiceFailed", `Channel Service failed: inmemorychannel: test-namespace/test-imc does not own Service: "test-imc-kn-channel"`),
431
+
WithInMemoryChannelChannelServiceNotReady("ChannelServiceFailed", fmt.Sprintf(`Channel Service failed: inmemorychannel: test-namespace/test-imc does not own Service: "%s"`, imcSvcName)),
430
432
),
431
433
}},
432
434
WantEvents: []string{
433
-
Eventf(corev1.EventTypeWarning, "InternalError", `inmemorychannel: test-namespace/test-imc does not own Service: "test-imc-kn-channel"`),
435
+
Eventf(corev1.EventTypeWarning, "InternalError", fmt.Sprintf(`inmemorychannel: test-namespace/test-imc does not own Service: "%s"`, imcSvcName)),
0 commit comments