-
Notifications
You must be signed in to change notification settings - Fork 2
92 lines (92 loc) · 2.6 KB
/
e2e.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
80
81
82
83
84
85
86
87
88
89
90
91
92
---
name: "Integration tests"
on:
push:
pull_request:
branches:
- master
jobs:
check_cni:
strategy:
matrix:
cni: [calico, cilium]
name: Check CNI install
runs-on: ubuntu-22.04
steps:
- uses: actions/setup-go@v3
with:
go-version: '^1.20.3'
- run: go version
- name: Checkout code
uses: actions/checkout@v2
- name: Build and install k8s-toolbox
run: |
go install .
- name: Install k8s using kind
run: |
ktbx install kind
ktbx install helm
ktbx create --single -c ${{ matrix.cni }}
kubectl get pods -n kube-system
kubectl get nodes
- name: Start and test nginx
run: |
./e2e/run-nginx.sh
check_argo:
name: Check argoCD install
runs-on: ubuntu-22.04
steps:
- uses: actions/setup-go@v3
with:
go-version: '^1.20.3'
- run: go version
- name: Checkout code
uses: actions/checkout@v2
- name: Build and install k8s-toolbox
run: |
go install .
- name: Install k8s using kind
run: |
ktbx install kind
ktbx create --single
kubectl get pods -n kube-system
kubectl get nodes
- name: Install olm and argocd
run: |
ktbx install olm
ktbx install argocd
- name: Run argocd example application
run: |
kubectl config set-context --current --namespace=argocd
argocd login --core
argocd app create apps --dest-namespace argocd --dest-server https://kubernetes.default.svc \
--repo https://github.com/argoproj/argocd-example-apps.git --path apps
argocd app sync apps
- name: Install argo-workflows
run: |
ktbx install argowf
check_audit_logs:
name: Enable api server audit log
runs-on: ubuntu-22.04
steps:
- uses: actions/setup-go@v3
with:
go-version: '^1.20.3'
- run: go version
- name: Checkout code
uses: actions/checkout@v2
- name: Build and install k8s-toolbox
run: |
go install .
- name: Install k8s using kind
run: |
ktbx install kind
mkdir $HOME/.ktbx
cp ./e2e/dot-config-audit $HOME/.ktbx/config
cp ./e2e/audit-policy.yaml /tmp/audit-policy.yaml
ktbx create
kubectl get pods -n kube-system
kubectl get nodes
- name: Check audit logs
run: |
docker exec -t -- kind-control-plane cat /var/log/kubernetes/kube-apiserver-audit.log