From 947bf6e65d2a022581baeadb6436f7215f478f7a Mon Sep 17 00:00:00 2001 From: DongWoo Lee Date: Wed, 4 Jan 2023 23:32:32 -0800 Subject: [PATCH] add ingress test --- .github/workflows/k3d-log-ci.yaml | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/.github/workflows/k3d-log-ci.yaml b/.github/workflows/k3d-log-ci.yaml index 45d7fa28..6952e91a 100644 --- a/.github/workflows/k3d-log-ci.yaml +++ b/.github/workflows/k3d-log-ci.yaml @@ -28,10 +28,14 @@ jobs: with: version: 3.10.2 + - name: Add hosts to /etc/hosts + run: | + sudo echo "127.0.0.1 myhost" | sudo tee -a /etc/hosts + - name: Start Cluster with Helm (chart/admin/logging) run: | ./chart/admin/logging/scripts/eck_install.sh - helm upgrade --install -f ./chart/admin/logging/values.yaml btrix-admin-log ./chart/admin/logging + helm upgrade --install -f ./chart/admin/logging/values.yaml btrix-admin-log ./chart/admin/logging --set logging.ingress.host=myhost - name: Wait for all pods to be ready run: | @@ -48,10 +52,15 @@ jobs: # check the auto-generated password for elastic while kubectl get secret btrixlog-es-elastic-user -n btrix-admin -o go-template='{{.data.elastic | base64decode}}'; ret=$?; [ $ret -ne 0 ]; do sleep 5; done + - name: Test Ingress + run: | + curl --retry 10 --retry-delay 5 --retry-connrefused -k https://myhost/kibana + - name: Test Kibana run: | kubectl port-forward service/btrixlog-kb-http -n btrix-admin 5601:5601 & - curl --retry 20 --retry-delay 10 --retry-connrefused -k https://localhost:5601/kibana + sleep 3 + curl --retry 10 --retry-delay 5 --retry-connrefused -k --header "Host: myhost" https://localhost:5601/kibana # - name: Clean up # run: |