Skip to content

Commit 8aad743

Browse files
authored
test: expose eventing broker to host (knative#3364)
This allows tests to easily post events to the broker directly. Signed-off-by: Matej Vašek <matejvasek@gmail.com>
1 parent 4f14a28 commit 8aad743

1 file changed

Lines changed: 22 additions & 0 deletions

File tree

hack/cluster.sh

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -287,6 +287,28 @@ eventing() {
287287
sleep 5
288288
$KUBECTL wait pod --for=condition=Ready -l '!job-name' -n knative-eventing --timeout=5m
289289

290+
echo "Exposing broker at broker.localtest.me"
291+
$KUBECTL apply -f - <<EOF
292+
apiVersion: networking.k8s.io/v1
293+
kind: Ingress
294+
metadata:
295+
name: broker-ingress
296+
namespace: knative-eventing
297+
spec:
298+
ingressClassName: contour-external
299+
rules:
300+
- host: broker.localtest.me
301+
http:
302+
paths:
303+
- backend:
304+
service:
305+
name: broker-ingress
306+
port:
307+
number: 80
308+
pathType: Prefix
309+
path: /
310+
EOF
311+
290312
echo "${green}✅ Eventing${reset}"
291313
}
292314

0 commit comments

Comments
 (0)