Skip to content

Commit

Permalink
feat(flux): convert to cluster/meta folder
Browse files Browse the repository at this point in the history
  • Loading branch information
buroa committed Jan 10, 2025
1 parent dbb41a2 commit fa8f676
Show file tree
Hide file tree
Showing 37 changed files with 13 additions and 31 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/flux-diff.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ jobs:
args: >-
diff ${{ matrix.resources }}
--unified 6
--path /github/workspace/pull/kubernetes/flux/config
--path-orig /github/workspace/default/kubernetes/flux/config
--path /github/workspace/pull/kubernetes/flux/cluster
--path-orig /github/workspace/default/kubernetes/flux/cluster
--strip-attrs "helm.sh/chart,checksum/config,app.kubernetes.io/version,chart"
--limit-bytes 10000
--all-namespaces
Expand Down Expand Up @@ -89,6 +89,6 @@ jobs:
name: Flux Diff Successful
runs-on: ubuntu-latest
steps:
- if: ${{ !contains(needs.*.result, 'success') }}
- if: ${{ contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled') }}
name: Check matrix status
run: exit 1
6 changes: 3 additions & 3 deletions .github/workflows/pre-pull-images.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
with:
args: >-
get cluster
--path /github/workspace/kubernetes/flux/config
--path /github/workspace/kubernetes/flux/cluster
--enable-images
--output yaml
--output-file images.yaml
Expand Down Expand Up @@ -92,11 +92,11 @@ jobs:

# Summarize matrix https://github.community/t/status-check-for-a-matrix-jobs/127354/7
pre-pull-images-success:
if: ${{ needs.compare-images.outputs.images != '[]' }}
if: ${{ always() }}
needs: ["pre-pull-images"]
name: Pre-pull Images Successful
runs-on: ubuntu-latest
steps:
- if: ${{ !contains(needs.*.result, 'success') }}
- if: ${{ contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled') }}
name: Check matrix status
run: exit 1
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ instance:
kind: GitRepository
url: ssh://[email protected]/buroa/k8s-gitops
ref: refs/heads/master
path: ./kubernetes/flux/config
path: ./kubernetes/flux/cluster
pullSecret: github-deploy-key
kustomize:
patches:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,30 +2,12 @@
apiVersion: kustomize.toolkit.fluxcd.io/v1
kind: Kustomization
metadata:
name: cluster-repositories
name: cluster-meta
namespace: flux-system
spec:
interval: 30m
path: ./kubernetes/flux/repositories
prune: false # revert after
wait: true
sourceRef:
kind: GitRepository
name: flux-system
decryption:
provider: sops
secretRef:
name: sops-age
---
apiVersion: kustomize.toolkit.fluxcd.io/v1
kind: Kustomization
metadata:
name: cluster-settings
namespace: flux-system
spec:
interval: 30m
path: ./kubernetes/flux/settings
prune: false # revert after
path: ./kubernetes/flux/meta
prune: true
wait: true
sourceRef:
kind: GitRepository
Expand All @@ -43,8 +25,7 @@ metadata:
spec:
interval: 30m
dependsOn:
- name: cluster-repositories
- name: cluster-settings
- name: cluster-meta
path: ./kubernetes/apps
prune: false # revert after
sourceRef:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- ./cluster.yaml
- ./repositories
- ./settings
File renamed without changes.
File renamed without changes.

0 comments on commit fa8f676

Please sign in to comment.