-
Notifications
You must be signed in to change notification settings - Fork 23
85 lines (69 loc) · 2.88 KB
/
helm-install-smoketest.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
name: Helm Install Smoketest
on:
pull_request:
branches: [main]
jobs:
helm-install-smoke-test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: "1.23.x"
- name: Install helm
uses: Azure/setup-helm@v4
with:
version: v3.14.0
- name: setup k3d
uses: engineerd/configurator@v0.0.10
with:
name: k3d
url: https://github.com/k3d-io/k3d/releases/download/v5.6.0/k3d-linux-amd64
- name: create spin-operator docker image
run: make docker-build IMG=spin-operator:latest
- name: start k3d cluster
run: |
k3d cluster create wasm-cluster \
--image ghcr.io/spinkube/containerd-shim-spin/k3d:v0.14.0 \
--port "8081:80@loadbalancer" \
--agents 2
- name: import operator image into k3d cluster
run: k3d image import -c wasm-cluster spin-operator:latest
- name: helm install cert-manager
run: |
helm repo add jetstack https://charts.jetstack.io
helm install cert-manager jetstack/cert-manager \
--namespace cert-manager \
--create-namespace \
--version v1.13.3 \
--set installCRDs=true
- name: install crds
run: make install
- name: helm install spin-operator
run: |
make helm-install IMG=spin-operator:latest HELM_EXTRA_ARGS=--debug
- name: create containerd-shim-spin executor
run: kubectl create -f config/samples/spin-shim-executor.yaml
- name: create runtime class
run: kubectl create -f config/samples/spin-runtime-class.yaml
- name: debug
if: failure()
run: |
kubectl get pods -A
kubectl get pods -n spin-operator
kubectl get certificate -n spin-operator
kubectl logs -n spin-operator $(kubectl get pods -n spin-operator | grep spin-operator-controller-manager | awk '{print $1}') || true
kubectl describe -n spin-operator pod $(kubectl get pods -n spin-operator | grep spin-operator-controller-manager | awk '{print $1}') || true
kubectl logs -n spin-operator $(kubectl get pods -n spin-operator | grep wait-for-webhook-svc | awk '{print $1}') || true
kubectl describe -n spin-operator pod $(kubectl get pods -n spin-operator | grep wait-for-webhook-svc | awk '{print $1}') || true
- name: run spin app
run: |
kubectl apply -f config/samples/simple.yaml
kubectl rollout status deployment simple-spinapp --timeout 90s
kubectl get pods -A
kubectl port-forward svc/simple-spinapp 8083:80 &
timeout 15s bash -c 'until curl -f -vvv http://localhost:8083/hello; do sleep 2; done'
- name: Verify curl
run: curl localhost:8083/hello