mirror of
https://github.com/stefanprodan/podinfo.git
synced 2026-05-04 00:26:43 +00:00
build: update e2e tests to validate secure-port
* pull out script blocks into `hack` path * update e2e workflow to use scripts in `hack` * install cert manager and self-signed cluster issuer in e2e * deploy podinfo with secure port and certificate enabled * add `hack/e2e.sh` script, which can be used to execute the github workflow locally
This commit is contained in:
@@ -6,34 +6,18 @@ kind create cluster --config=kind.yaml
|
||||
# add certificate manager
|
||||
kubectl apply -f https://github.com/jetstack/cert-manager/releases/download/v1.0.4/cert-manager.yaml
|
||||
|
||||
# wait for cert manager webhook
|
||||
kubectl wait --namespace cert-manager \
|
||||
--for=condition=available deployment \
|
||||
--selector=app=webhook \
|
||||
--timeout=120s
|
||||
# wait for cert manager
|
||||
kubectl rollout status --namespace cert-manager deployment/cert-manager --timeout=2m
|
||||
kubectl rollout status --namespace cert-manager deployment/cert-manager-webhook --timeout=2m
|
||||
kubectl rollout status --namespace cert-manager deployment/cert-manager-cainjector --timeout=2m
|
||||
|
||||
# wait for the injector
|
||||
kubectl wait --namespace cert-manager \
|
||||
--for=condition=available deployment \
|
||||
--selector=app=cainjector \
|
||||
--timeout=120s
|
||||
|
||||
# wait for the cert manager
|
||||
kubectl wait --namespace cert-manager \
|
||||
--for=condition=available deployment \
|
||||
--selector=app=cert-manager \
|
||||
--timeout=120s
|
||||
|
||||
# apply the secure webapp
|
||||
# # apply the secure webapp
|
||||
kubectl apply -f ./secure/common
|
||||
kubectl apply -f ./secure/backend
|
||||
kubectl apply -f ./secure/frontend
|
||||
|
||||
# wait for the podinfo frontend to come up
|
||||
kubectl wait --namespace secure \
|
||||
--for=condition=ready pod \
|
||||
--selector=app=frontend \
|
||||
--timeout=120s
|
||||
# # wait for the podinfo frontend to come up
|
||||
kubectl rollout status --namespace secure deployment/frontend --timeout=1m
|
||||
|
||||
# curl the endpoints (responds with info due to header regexp on route handler)
|
||||
echo
|
||||
|
||||
Reference in New Issue
Block a user