-
Notifications
You must be signed in to change notification settings - Fork 16
/
02-kn-eventing.sh
executable file
·46 lines (37 loc) · 1.12 KB
/
02-kn-eventing.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#!/usr/bin/env bash
set -e
# Turn colors in this script off by setting the NO_COLOR variable in your
# environment to any value:
#
# $ NO_COLOR=1 test.sh
NO_COLOR=${NO_COLOR:-""}
if [ -z "$NO_COLOR" ]; then
header=$'\e[1;33m'
reset=$'\e[0m'
else
header=''
reset=''
fi
eventing_version="v1.16.2"
eventing_url=https://github.com/knative/eventing/releases/download/knative-${eventing_version}
while [[ $# -ne 0 ]]; do
parameter=$1
case ${parameter} in
--nightly)
nightly=1
eventing_version=nightly
eventing_url=https://knative-nightly.storage.googleapis.com/eventing/latest
;;
*) abort "unknown option ${parameter}" ;;
esac
shift
done
function header_text {
echo "$header$*$reset"
}
header_text "Using Knative Eventing Version: ${eventing_version}"
header_text "Setting up Knative Eventing"
kubectl apply --filename $eventing_url/eventing.yaml
#kubectl apply --filename $eventing_url/eventing-sugar-controller.yaml
header_text "Waiting for Knative Eventing to become ready"
kubectl wait deployment --all --timeout=-1s --for=condition=Available -n knative-eventing