|
1 | 1 | #!/usr/bin/env bash |
2 | 2 |
|
3 | | -trap "trap - SIGTERM && kill -- -$$" SIGINT SIGTERM EXIT |
| 3 | +# |
4 | 4 | # Welcome to the catalogd demo |
| 5 | +# |
| 6 | +trap "trap - SIGTERM && kill -- -$$" SIGINT SIGTERM EXIT |
| 7 | + |
| 8 | + |
5 | 9 | kind delete cluster |
6 | 10 | kind create cluster |
7 | 11 | kubectl cluster-info --context kind-kind |
8 | 12 | sleep 10 |
9 | | -# install catalogd on the cluster |
10 | | -# could also `make install` in repo |
11 | | -kubectl apply -f https://github.com/operator-framework/catalogd/releases/latest/download/catalogd.yaml |
12 | | -kubectl wait --for=condition=Available -n olmv1-system deploy/catalogd-controller-manager --timeout=60s |
13 | | -sleep 10 |
14 | 13 |
|
15 | | -# inspect crds (catalog) |
| 14 | +# use the install script from the latest github release |
| 15 | +curl -L -s https://github.com/operator-framework/catalogd/releases/latest/download/install.sh | bash |
| 16 | + |
| 17 | +# inspect crds (clustercatalog) |
16 | 18 | kubectl get crds -A |
| 19 | +kubectl get clustercatalog -A |
17 | 20 |
|
18 | | -# create a catalog |
19 | | -kubectl apply -f config/samples/core_v1alpha1_catalog.yaml |
20 | | -# shows catalog-sample |
21 | | -kubectl get catalog -A |
22 | | -# waiting for catalog to report ready status |
23 | | -time kubectl wait --for=condition=Serving catalog/operatorhubio --timeout=1m |
| 21 | +echo "... checking catalogd controller is available" |
| 22 | +kubectl wait --for=condition=Available -n olmv1-system deploy/catalogd-controller-manager --timeout=1m |
| 23 | +echo "... checking clustercatalog is serving" |
| 24 | +kubectl wait --for=condition=Serving clustercatalog/operatorhubio --timeout=60s |
| 25 | +echo "... checking clustercatalog is finished unpacking" |
| 26 | +kubectl wait --for=condition=Progressing=False clustercatalog/operatorhubio --timeout=60s |
24 | 27 |
|
25 | 28 | # port forward the catalogd-service service to interact with the HTTP server serving catalog contents |
26 | | -(kubectl -n olmv1-system port-forward svc/catalogd-service 8080:80)& |
| 29 | +(kubectl -n olmv1-system port-forward svc/catalogd-service 8081:443)& |
| 30 | + |
| 31 | +sleep 3 |
27 | 32 |
|
28 | 33 | # check what 'packages' are available in this catalog |
29 | | -curl http://localhost:8080/catalogs/operatorhubio/api/v1/all | jq -s '.[] | select(.schema == "olm.package") | .name' |
| 34 | +curl -k https://localhost:8081/catalogs/operatorhubio/api/v1/all | jq -s '.[] | select(.schema == "olm.package") | .name' |
30 | 35 | # check what channels are included in the wavefront package |
31 | | -curl http://localhost:8080/catalogs/operatorhubio/api/v1/all | jq -s '.[] | select(.schema == "olm.channel") | select(.package == "wavefront") | .name' |
| 36 | +curl -k https://localhost:8081/catalogs/operatorhubio/api/v1/all | jq -s '.[] | select(.schema == "olm.channel") | select(.package == "wavefront") | .name' |
32 | 37 | # check what bundles are included in the wavefront package |
33 | | -curl http://localhost:8080/catalogs/operatorhubio/api/v1/all | jq -s '.[] | select(.schema == "olm.bundle") | select(.package == "wavefront") | .name' |
| 38 | +curl -k https://localhost:8081/catalogs/operatorhubio/api/v1/all | jq -s '.[] | select(.schema == "olm.bundle") | select(.package == "wavefront") | .name' |
34 | 39 |
|
0 commit comments