-
Notifications
You must be signed in to change notification settings - Fork 0
86 lines (84 loc) · 2.38 KB
/
matrix.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
86
name: "Test Matrix"
on:
push:
branches:
- integration/**
- main
paths-ignore:
- '**/*.md'
pull_request:
paths:
- .github/workflows/matrix.yaml
- .github/actions/provision-cluster/**
- provision-cluster/**
- '!**/*.md'
workflow_dispatch:
inputs:
logLevel:
description: 'Log level'
required: true
default: 'warning'
jobs:
test_matrix_gke:
strategy:
matrix:
client_os: [ubuntu]
client_arch: [latest]
clusters:
- version: "1.29"
useAuthProvider: "true"
- version: "1.29"
useAuthProvider: "false"
- version: "1.29"
config: '{ "initialNodeCount" : 2 }'
runs-on: ${{ matrix.client_os }}-${{ matrix.client_arch }}
env:
GKE_CREDENTIALS: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }}
steps:
- uses: actions/checkout@v4
- uses: Azure/setup-kubectl@v3
- uses: ./provision-cluster
with:
distribution: GKE
version: ${{ matrix.clusters.version }}
kubeconfig: kubeconfig.yaml
gkeCredentials: ${{ env.GKE_CREDENTIALS }}
gkeConfig: ${{ matrix.clusters.config }}
useAuthProvider: ${{ matrix.clusters.useAuthProvider }}
- run: |
kubectl config view
kubectl version
kubectl get pods -A
- name: "validate gke config"
if: ${{ startsWith(matrix.clusters.config, '{') }}
run: |
nodecount=$(kubectl get nodes --no-headers | wc -l | bc)
if [[ $nodecount == 2 ]]; then
echo "Gke config was used!"
else
echo "Gke config was not used"
exit 1
fi
test_matrix_kubeception:
strategy:
matrix:
client_os: [ubuntu]
client_arch: [latest]
clusters:
- version: "1.29"
runs-on: ${{ matrix.client_os }}-${{ matrix.client_arch }}
env:
KUBECEPTION_TOKEN: ${{ secrets.KUBECEPTION_TOKEN }}
steps:
- uses: actions/checkout@v4
- uses: Azure/setup-kubectl@v3
- uses: ./provision-cluster
with:
distribution: Kubeception
version: ${{ matrix.clusters.version }}
kubeconfig: kubeconfig.yaml
kubeceptionToken: ${{ env.KUBECEPTION_TOKEN }}
- run: |
kubectl config view
kubectl version
kubectl get pods -A