Skip to content

Commit 46da5d5

Browse files
committed
Add e2e tests for Flux bootstrap
Signed-off-by: Stefan Prodan <[email protected]>
1 parent c821560 commit 46da5d5

File tree

3 files changed

+53
-15
lines changed

3 files changed

+53
-15
lines changed

.github/workflows/ci.yaml

Lines changed: 0 additions & 13 deletions
This file was deleted.

.github/workflows/e2e.yaml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: e2e
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
branches: [ '*' ]
7+
tags-ignore: [ '*' ]
8+
9+
jobs:
10+
kubernetes:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout
14+
uses: actions/checkout@v2
15+
- name: Setup Flux
16+
uses: fluxcd/flux2/action@main
17+
- name: Setup Kubernetes
18+
uses: engineerd/[email protected]
19+
with:
20+
version: "v0.10.0"
21+
image: "kindest/node:v1.20.2"
22+
- name: Install Flux in Kubernetes Kind
23+
run: flux install
24+
- name: Setup cluster reconciliation
25+
run: |
26+
flux create source git flux-system \
27+
--url=${{ github.event.repository.html_url }} \
28+
--branch=${GITHUB_REF#refs/heads/}
29+
flux create kustomization flux-system \
30+
--source=flux-system \
31+
--path=./clusters/my-cluster
32+
- name: Verify cluster reconciliation
33+
run: |
34+
kubectl -n flux-system wait kustomization/istio-operator --for=condition=ready --timeout=1m
35+
kubectl -n flux-system wait kustomization/istio-system --for=condition=ready --timeout=1m
36+
kubectl -n flux-system wait kustomization/apps --for=condition=ready --timeout=1m
37+
kubectl -n prod wait canary/frontend --for=condition=promoted
38+
kubectl -n prod wait canary/backend --for=condition=promoted
39+
- name: List canaries
40+
run: |
41+
kubectl -n prod get canaries
42+
- name: Debug failure
43+
if: failure()
44+
run: |
45+
kubectl -n flux-system get all
46+
kubectl -n flux-system logs deploy/source-controller
47+
kubectl -n flux-system logs deploy/kustomize-controller
48+
kubectl -n flux-system logs deploy/helm-controller
49+
kubectl -n istio-operator get all
50+
kubectl -n istio-system get all
51+
kubectl -n prod get all

.github/workflows/update-istio.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ on:
55
- cron: '0 8 */1 * *'
66
push:
77
branches:
8-
- 'master'
8+
- 'main'
99

1010
jobs:
1111
check-istio:
@@ -14,7 +14,7 @@ jobs:
1414
- name: Checkout
1515
uses: actions/checkout@v2
1616
with:
17-
ref: master
17+
ref: main
1818
- name: Setup Helm
1919
uses: ./.github/actions/helm
2020
with:

0 commit comments

Comments
 (0)