zrok 0.4.0 #76
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Test charts in minikube | |
on: | |
workflow_dispatch: | |
pull_request: | |
paths: | |
- '.github/workflows/miniziti.yml' | |
- 'charts/ziti-controller/**' | |
- 'charts/ziti-router/**' | |
- 'charts/ziti-console/**' | |
- 'charts/httpbin/**' | |
- 'charts/zrok/**' | |
# cancel older, redundant runs of same workflow on same branch | |
concurrency: | |
group: ${{ github.workflow }}-${{github.event_name}}-${{ github.head_ref || github.ref_name }} | |
cancel-in-progress: true | |
jobs: | |
miniziti: | |
runs-on: ubuntu-latest | |
name: deploy to minikube | |
steps: | |
- name: Checkout workspace | |
uses: actions/checkout@v3 | |
- name: Start minikube | |
uses: medyagh/setup-minikube@v0.0.14 | |
with: | |
start-args: --profile miniziti | |
- name: Find minikube IP address | |
id: minikube_ip | |
run: echo "minikube_ip=$(minikube --profile miniziti ip)" >> $GITHUB_OUTPUT | |
- name: install ziti cli | |
uses: supplypike/setup-bin@v3 | |
with: | |
uri: https://github.com/openziti/ziti/releases/download/v0.30.4/ziti-linux-amd64-0.30.4.tar.gz | |
name: ziti | |
version: "0.30.4" | |
# this is the kubernetes quickstart script from | |
# https://openziti.io/docs/learn/quickstarts/network/local-kubernetes | |
- name: install miniziti | |
uses: supplypike/setup-bin@v3 | |
with: | |
# uri: https://raw.githubusercontent.com/qrkourier/ziti/d8a2d6e6da0c5edbf67357969a672daffc468bf3/quickstart/kubernetes/miniziti.bash | |
uri: https://get.openziti.io/miniziti.bash | |
name: miniziti | |
version: quickstartrelease | |
- name: Run miniziti with latest release charts | |
run: miniziti start --no-hosts --verbose | |
- 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 | |
--jwt ~/.local/state/miniziti/profiles/miniziti/identities/miniziti-client.jwt | |
--out ~/.local/state/miniziti/profiles/miniziti/identities/miniziti-client.json | |
- name: Run client proxy | |
run: > | |
nohup ziti tunnel proxy "httpbin-service:4321" | |
--identity ~/.local/state/miniziti/profiles/miniziti/identities/miniziti-client.json | |
--verbose </dev/null &>/tmp/miniziti-client.log & | |
- name: Wait for proxy to serve the httpbin service | |
uses: iFaxity/wait-on-action@v1 | |
with: | |
resource: http://127.0.0.1:4321/get | |
delay: 1000 | |
interval: 1000 | |
timeout: 10000 | |
- name: Send a POST request to the httpbin service and verify the response data | |
run: | | |
set -euo pipefail | |
curl -sSf -XPOST -F ziti=awesome http://127.0.0.1:4321/post > /tmp/httpbin-response.json | |
AWESOME=$(jq -r '.form.ziti[0]' /tmp/httpbin-response.json) | |
if [[ "$AWESOME" == "awesome" ]]; then | |
echo "Ziti is awesome!" | |
else | |
echo "Got '$AWESOME' instead of 'awesome'" >&2 | |
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 |