-
Notifications
You must be signed in to change notification settings - Fork 90
79 lines (65 loc) · 2.07 KB
/
stargz_tests.yml
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
name: vHive stock-only stargz tests
on:
push:
branches: [ main ]
paths-ignore:
- 'docs/**'
- '**.md'
- 'function-images/**'
pull_request:
branches: [ main ]
paths-ignore:
- 'docs/**'
- '**.md'
- 'function-images/**'
workflow_dispatch:
env:
GOOS: linux
GO111MODULE: on
jobs:
stargz-container-test:
name: Test running stargz-based image using kn
env:
KIND_VERSION: v0.14.0
K8S_VERSION: v1.23
YAML_DIR: workloads/container
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
service:
[
trace_func_go,
]
steps:
- uses: actions/checkout@v3
with:
lfs: "true"
- name: Checkout LFS objects
run: git lfs checkout
- name: Set up Go 1.19
uses: actions/setup-go@v4
with:
go-version: '1.19'
- name: Create k8s Kind Cluster
run: bash ./scripts/stargz/01-kind.sh
- name: Install Serving
run: bash ./scripts/stargz/02-serving.sh
- name: Install Kourier
run: bash ./scripts/stargz/02-kourier.sh
- name: Setup domain and autoscaler
run: |
INGRESS_HOST="127.0.0.1"
KNATIVE_DOMAIN=$INGRESS_HOST.sslip.io
kubectl patch configmap -n knative-serving config-domain -p "{\"data\": {\"$KNATIVE_DOMAIN\": \"\"}}"
kubectl patch configmap -n knative-serving config-autoscaler -p "{\"data\": {\"allow-zero-initial-scale\": \"true\"}}"
- name: Setup stock-only node
run: ./scripts/cloudlab/setup_node.sh stock-only use-stargz
- name: Check containerd service is running
run: sudo screen -list | grep "containerd"
- name: Check stargz-snapshotter is running
run: sudo systemctl is-active --quiet stargz-snapshotter
- name: Run test container with kn
run: kn service apply stargz-test -f ./configs/knative_workloads/stargz-node.yaml --concurrency-target 1
- name: Curl container
run: curl http://stargz-test.default.127.0.0.1.sslip.io | grep "Hello World"