forked from fluxcd/flux2-multi-tenancy
-
Notifications
You must be signed in to change notification settings - Fork 0
58 lines (55 loc) · 2.13 KB
/
e2e.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
name: e2e
on:
workflow_dispatch:
push:
branches: [ '*' ]
jobs:
kubernetes:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Flux
uses: fluxcd/flux2/action@main
- name: Setup Kubernetes
uses: helm/[email protected]
with:
cluster_name: flux
- name: Install Flux in Kubernetes Kind
run: flux install --log-level debug
- name: Setup cluster reconciliation
run: |
flux create source git flux-system \
--interval=15m \
--url=${{ github.event.repository.html_url }} \
--branch=${GITHUB_REF#refs/heads/} \
--ignore-paths="./clusters/**/flux-system/"
flux create kustomization flux-system \
--interval=15m \
--source=flux-system \
--path=./clusters/staging
- name: Verify cluster reconciliation
run: |
kubectl -n flux-system wait kustomization/kyverno --for=condition=ready --timeout=5m
kubectl -n flux-system wait kustomization/kyverno-controller --for=condition=ready --timeout=3m
kubectl -n flux-system wait kustomization/kyverno-policies --for=condition=ready --timeout=3m
kubectl -n flux-system wait kustomization/tenants --for=condition=ready --timeout=3m
- name: Verify tenant reconciliation
run: |
kubectl -n apps wait kustomization/dev-team --for=condition=ready --timeout=1m
kubectl -n apps wait helmrelease/podinfo --for=condition=ready --timeout=1m
- name: List reconciliations
run: |
flux get all --all-namespaces
- name: Logs
if: always()
run: |
kubectl -n flux-system get all
kubectl -n flux-system logs deploy/source-controller
kubectl -n flux-system logs deploy/kustomize-controller
kubectl -n kyverno get all
kubectl -n kyverno describe po
kubectl -n kyverno logs -l app.kubernetes.io/part-of=kyverno
kubectl get clusterpolicies.kyverno.io -oyaml
flux get sources all --all-namespaces
flux get ks --all-namespaces