Skip to content

Commit a998d77

Browse files
committed
add metas endpoint demo script
Signed-off-by: Jordan Keister <[email protected]>
1 parent cb9af75 commit a998d77

File tree

2 files changed

+19
-14
lines changed

2 files changed

+19
-14
lines changed

Makefile

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -301,10 +301,15 @@ kind-clean: $(KIND) #EXHELP Delete the kind cluster.
301301

302302
#SECTION Build
303303

304-
ifeq ($(origin VERSION), undefined)
304+
# attempt to generate the VERSION attribute for certificates
305+
# fail if it is unset afterwards, since the sideeffects are indirect
306+
ifeq ($(strip $(VERSION)),)
305307
VERSION := $(shell git describe --tags --always --dirty)
306308
endif
307309
export VERSION
310+
ifeq ($(strip $(VERSION)),)
311+
$(error undefined VERSION; resulting certs will be invalid)
312+
endif
308313

309314
ifeq ($(origin CGO_ENABLED), undefined)
310315
CGO_ENABLED := 0

hack/demo/catalogd-metas-demo-script.sh

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44
#
55
trap 'trap - SIGTERM && kill -- -"$$"' SIGINT SIGTERM EXIT
66

7-
kind delete cluster
8-
kind create cluster
9-
kubectl cluster-info --context kind-kind
10-
sleep 10
11-
12-
# use the install script from the latest github release
13-
curl -L -s https://github.com/operator-framework/operator-controller/releases/latest/download/install.sh | bash
7+
## until we cut a release containing the new API, we need to deploy local artifacts
8+
make kind-clean
9+
make run
10+
#
11+
## use the install script from the latest github release
12+
#curl -L -s https://github.com/operator-framework/operator-controller/releases/latest/download/install.sh | bash
13+
#
1414

1515
# inspect crds (clustercatalog)
1616
kubectl get crds -A
@@ -26,19 +26,19 @@ kubectl patch -n olmv1-system deploy/catalogd-controller-manager --type='json' -
2626
kubectl rollout status -n olmv1-system deploy/catalogd-controller-manager
2727
# ... checking clustercatalog is serving
2828
kubectl wait --for=condition=Serving clustercatalog/operatorhubio --timeout=60s
29-
# ... checking clustercatalog is finished unpacking
30-
kubectl wait --for=condition=Progressing=False clustercatalog/operatorhubio --timeout=60s
29+
# ... checking clustercatalog is finished unpacking (progressing gone back to true)
30+
kubectl wait --for=condition=Progressing=True clustercatalog/operatorhubio --timeout=60s
3131

32+
sleep 30
3233

3334
# port forward the catalogd-service service to interact with the HTTP server serving catalog contents
3435
(kubectl -n olmv1-system port-forward svc/catalogd-service 8081:443)&
3536

36-
sleep 3
3737

3838
# check what 'packages' are available in this catalog
39-
curl -vvv -k 'https://localhost:8081/catalogs/operatorhubio/api/v1/metas?schema=olm.package' | jq -s '.[] | .name'
39+
curl -f -k 'https://localhost:8081/catalogs/operatorhubio/api/v1/metas?schema=olm.package' | jq -s '.[] | .name'
4040
# check what channels are included in the wavefront package
41-
curl -vvv -k 'https://localhost:8081/catalogs/operatorhubio/api/v1/metas?schema=olm.channel&package=wavefront' | jq -s '.[] | .name'
41+
curl -f -k 'https://localhost:8081/catalogs/operatorhubio/api/v1/metas?schema=olm.channel&package=wavefront' | jq -s '.[] |.name'
4242
# check what bundles are included in the wavefront package
43-
curl -vvv -k 'https://localhost:8081/catalogs/operatorhubio/api/v1/metas?schema=olm.bundle&package=wavefront' | jq -s '.[] | .name'
43+
curl -f -k 'https://localhost:8081/catalogs/operatorhubio/api/v1/metas?schema=olm.bundle&package=wavefront' | jq -s '.[] |.name'
4444

0 commit comments

Comments
 (0)