From 510ae707c42c8bc230ff25fc71cd05d6947cfb9c Mon Sep 17 00:00:00 2001 From: Kenneth Bingham Date: Wed, 10 Jan 2024 19:04:15 -0500 Subject: [PATCH] test the zrok chart if it changes --- .github/workflows/miniziti.yml | 32 ++++++++++++++++++++++++++++++++ charts/zrok/minimal-values.yml | 13 ++++++++++--- 2 files changed, 42 insertions(+), 3 deletions(-) diff --git a/.github/workflows/miniziti.yml b/.github/workflows/miniziti.yml index 745605fb..0e8f79db 100644 --- a/.github/workflows/miniziti.yml +++ b/.github/workflows/miniziti.yml @@ -8,6 +8,7 @@ on: - 'charts/ziti-router/**' - 'charts/ziti-console/**' - 'charts/httpbin/**' + - 'charts/zrok/**' # cancel older, redundant runs of same workflow on same branch concurrency: @@ -27,6 +28,10 @@ jobs: with: start-args: --profile miniziti + - name: Find minikube IP address + id: minikube_ip + run: echo "minikube_ip=$(minikube ip)" >> $GITHUB_OUTPUT + - name: install ziti cli uses: supplypike/setup-bin@v3 with: @@ -50,6 +55,13 @@ jobs: - name: Upgrade miniziti with charts from this branch run: miniziti start --no-hosts --verbose --charts ./charts + - name: Find the ziti admin password + id: ziti_pwd + run: | + miniziti kubectl get secrets "ziti-controller-admin-secret" \ + --output go-template='{{index .data "admin-password" | base64decode }}' \ + | xargs -IZITI_PWD echo "ziti_pwd=ZITI_PWD" >> $GITHUB_OUTPUT + - name: Enroll client identity run: > ziti edge enroll @@ -82,6 +94,26 @@ jobs: exit 1 fi + - name: Install zrok chart + shell: bash + run: > + helm upgrade + --install + --namespace zrok --create-namespace + --set ziti.password="${{ steps.ziti_pwd.outputs.ziti_pwd }}" + --set controller.ingress.hosts[0].host=ctrl.zrok.${{ steps.minikube_ip.outputs.minikube_ip }}.sslip.io + --set frontend.ingress.hosts[0].host=share.zrok.${{ steps.minikube_ip.outputs.minikube_ip }}.sslip.io + --values=./charts/zrok/minimal-values.yml + zrok ./charts/zrok + + - name: Wait for the zrok API to become available + uses: iFaxity/wait-on-action@v1 + with: + resource: http://ctrl.zrok.${{ steps.minikube_ip.outputs.minikube_ip }}/api/v1/version + delay: 1000 + interval: 1000 + timeout: 10000 + - name: Print the proxy log if: always() run: cat /tmp/miniziti-client.log diff --git a/charts/zrok/minimal-values.yml b/charts/zrok/minimal-values.yml index c83d6dd6..cff2cd04 100644 --- a/charts/zrok/minimal-values.yml +++ b/charts/zrok/minimal-values.yml @@ -1,16 +1,23 @@ + +# these minimal input values serve the GitHub Actions workflow miniziti.yml which installs this chart in a minikube +# cluster that is also running a minimal Ziti network, scripted by miniziti.bash + controller: ingress: enabled: true scheme: http className: nginx - hosts: ["ctrl.zrok.192.168.49.2.sslip.io"] + hosts: [] + # hosts: ["ctrl.zrok.192.168.49.2.sslip.io"] frontend: ingress: enabled: true scheme: http className: nginx - hosts: ["share.zrok.192.168.49.2.sslip.io"] + hosts: [] + # hosts: ["share.zrok.192.168.49.2.sslip.io"] ziti: - advertisedHost: ziti-controller-client.miniziti.svc.cluster.local + advertisedHost: + # advertisedHost: ziti-controller-client.miniziti.svc.cluster.local