Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .github/renovate.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,8 @@
"extends": [
"config:base",
":disableDependencyDashboard"
]
],
"docker-compose": {
"enabled": false
}
}
13 changes: 9 additions & 4 deletions .github/workflows/end-to-end-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ jobs:
uses: actions/checkout@v3
- name: Setup Flux
uses: fluxcd/flux2/action@main
- name: Extract branch name
shell: bash
run: echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_OUTPUT
id: extract_branch
- name: Setup Kubernetes
uses: nolar/setup-k3d-k3s@v1
with:
Expand All @@ -26,18 +30,19 @@ jobs:
run: |
flux create source git flux-system \
--url=${{ github.event.repository.html_url }} \
--branch=${GITHUB_REF} \
--branch=${{ steps.extract_branch.outputs.branch }} \
--ignore-paths="./k8s/clusters/**/flux-system/"
flux create kustomization flux-system \
--source=flux-system \
--path=./k8s/clusters/development
- name: Verify cluster reconciliation
run: |
kubectl -n flux-system wait kustomization/infra-controllers --for=condition=ready --timeout=5m
kubectl -n flux-system wait kustomization/infra-configs --for=condition=ready --timeout=5m
kubectl -n flux-system wait kustomization/apps --for=condition=ready --timeout=5m
- name: Verify helm reconciliation
run: |
kubectl -n podinfo wait helmrelease/podinfo --for=condition=ready --timeout=5m
# - name: Verify helm reconciliation
# run: |
# kubectl -n podinfo wait helmrelease/podinfo --for=condition=ready --timeout=5m
- name: Debug failure
if: failure()
run: |
Expand Down
Empty file removed k8s/apps/development/.gitkeep
Empty file.
3 changes: 3 additions & 0 deletions k8s/apps/development/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources: []
3 changes: 3 additions & 0 deletions k8s/apps/production/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources: []
16 changes: 16 additions & 0 deletions k8s/clusters/production/apps.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
apiVersion: kustomize.toolkit.fluxcd.io/v1
kind: Kustomization
metadata:
name: apps
namespace: flux-system
spec:
interval: 10m
dependsOn:
- name: infra-configs
sourceRef:
kind: GitRepository
name: flux-system
path: ./k8s/apps/production
prune: true
wait: true
39 changes: 39 additions & 0 deletions k8s/clusters/production/infrastructure.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
---
apiVersion: kustomize.toolkit.fluxcd.io/v1
kind: Kustomization
metadata:
name: infra-controllers
namespace: flux-system
spec:
interval: 1h
retryInterval: 1m
sourceRef:
kind: GitRepository
name: flux-system
path: ./k8s/infrastructure/controllers
prune: true
wait: true
---
apiVersion: kustomize.toolkit.fluxcd.io/v1
kind: Kustomization
metadata:
name: infra-configs
namespace: flux-system
spec:
dependsOn:
- name: infra-controllers
interval: 1h
retryInterval: 1m
sourceRef:
kind: GitRepository
name: flux-system
path: ./k8s/infrastructure/configs
prune: true
patches:
- patch: |
- op: replace
path: /spec/acme/server
value: https://acme-staging-v02.api.letsencrypt.org/directory
target:
kind: ClusterIssuer
name: letsencrypt
2 changes: 1 addition & 1 deletion k8s/infrastructure/configs/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- cluster-issuers.yaml
# - cluster-issuers.yaml
- network-policies.yaml
Empty file.
3 changes: 3 additions & 0 deletions k8s/infrastructure/controllers/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources: []