Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(flux): convert to cluster/meta folder #3287

Merged
merged 1 commit into from
Jan 10, 2025
Merged
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
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://git@github.com/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
Loading