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: move flux repos and settings to kubernetes dir #8326

Merged
merged 10 commits into from
Nov 9, 2024
20 changes: 13 additions & 7 deletions .github/workflows/flux-diff.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ jobs:
uses: tj-actions/changed-files@v45
with:
files: kubernetes/**
files_ignore: kubernetes/shared/**
dir_names: true
dir_names_max_depth: 2
matrix: true
Expand Down Expand Up @@ -93,13 +94,18 @@ jobs:
- name: Generate Diff
id: diff
run: |
echo "diff<<EOF" >> $GITHUB_OUTPUT
cat diff.patch >> $GITHUB_OUTPUT
echo "EOF" >> $GITHUB_OUTPUT
echo "### Diff" >> $GITHUB_STEP_SUMMARY
echo '```diff' >> $GITHUB_STEP_SUMMARY
cat diff.patch >> $GITHUB_STEP_SUMMARY
echo '```' >> $GITHUB_STEP_SUMMARY
cat diff.patch;
{
echo 'diff<<EOF'
cat diff.patch
echo EOF
} >> "$GITHUB_OUTPUT";
{
echo "### Diff"
echo '```diff'
cat diff.patch
echo '```'
} >> "$GITHUB_STEP_SUMMARY"

- if: ${{ steps.diff.outputs.diff != '' }}
name: Add comment
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/flux-image-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ jobs:
uses: tj-actions/changed-files@v45
with:
files: kubernetes/**
files_ignore: kubernetes/shared/**
dir_names: true
dir_names_max_depth: 2
matrix: true
Expand Down
61 changes: 0 additions & 61 deletions kubernetes/main/apps/default/kopia/app/externalsecret.yaml

This file was deleted.

141 changes: 0 additions & 141 deletions kubernetes/main/apps/default/kopia/app/helmrelease.yaml

This file was deleted.

8 changes: 0 additions & 8 deletions kubernetes/main/apps/default/kopia/app/kustomization.yaml

This file was deleted.

25 changes: 0 additions & 25 deletions kubernetes/main/apps/default/kopia/ks.yaml

This file was deleted.

1 change: 0 additions & 1 deletion kubernetes/main/apps/default/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ resources:
- ./filebrowser/ks.yaml
- ./go2rtc/ks.yaml
- ./home-assistant/ks.yaml
- ./kopia/ks.yaml
- ./minio/ks.yaml
- ./miniflux/ks.yaml
- ./omegabrr/ks.yaml
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ spec:
endpoints:
- dnsName: external.devbu.io
recordType: CNAME
targets: ["${CLUSTER_CLOUDFLARE_TUNNEL_ID}.cfargotunnel.com"]
targets: ["13a8cf0a-e16c-468b-a7c2-1fdd1719394e.cfargotunnel.com"]
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ spec:
{
"AccountTag": "{{ .CLOUDFLARE_ACCOUNT_TAG }}",
"TunnelSecret": "{{ .CLOUDFLARE_TUNNEL_SECRET }}",
"TunnelID": "${CLUSTER_CLOUDFLARE_TUNNEL_ID}"
"TunnelID": "13a8cf0a-e16c-468b-a7c2-1fdd1719394e"
}
dataFrom:
- extract:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ spec:
- --config
- /etc/cloudflared/config/config.yaml
- run
- "${CLUSTER_CLOUDFLARE_TUNNEL_ID}"
- 13a8cf0a-e16c-468b-a7c2-1fdd1719394e
probes:
liveness: &probes
enabled: true
Expand Down
6 changes: 3 additions & 3 deletions kubernetes/main/flux/apps.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ metadata:
name: cluster-apps
namespace: flux-system
spec:
interval: 10m
interval: 30m
path: ./kubernetes/main/apps
prune: true
sourceRef:
Expand All @@ -20,7 +20,7 @@ spec:
substituteFrom:
- name: cluster-settings
kind: ConfigMap
optional: false
optional: true
- name: cluster-secrets
kind: Secret
optional: true
Expand All @@ -39,7 +39,7 @@ spec:
substituteFrom:
- name: cluster-settings
kind: ConfigMap
optional: false
optional: true
- name: cluster-secrets
kind: Secret
optional: true
Expand Down
22 changes: 20 additions & 2 deletions kubernetes/main/flux/config/cluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,24 @@ spec:
ignore: |
# exclude all
/*
# include flux directories
# include dirs
!/kubernetes/main
!/kubernetes/shared
---
# yaml-language-server: $schema=https://kubernetes-schemas.pages.dev/kustomize.toolkit.fluxcd.io/kustomization_v1.json
apiVersion: kustomize.toolkit.fluxcd.io/v1
kind: Kustomization
metadata:
name: cluster-shared
namespace: flux-system
spec:
interval: 30m
path: ./kubernetes/shared
prune: true
wait: true
sourceRef:
kind: GitRepository
name: home-kubernetes
---
# yaml-language-server: $schema=https://kubernetes-schemas.pages.dev/kustomize.toolkit.fluxcd.io/kustomization_v1.json
apiVersion: kustomize.toolkit.fluxcd.io/v1
Expand All @@ -26,6 +42,8 @@ metadata:
namespace: flux-system
spec:
interval: 30m
dependsOn:
- name: cluster-shared
path: ./kubernetes/main/flux
prune: true
wait: false
Expand All @@ -40,7 +58,7 @@ spec:
substituteFrom:
- name: cluster-settings
kind: ConfigMap
optional: false
optional: true
- name: cluster-secrets
kind: Secret
optional: true
Empty file.
3 changes: 2 additions & 1 deletion kubernetes/main/flux/config/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
# yaml-language-server: $schema=https://json.schemastore.org/kustomization
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
namespace: flux-system
resources:
- ./flux.yaml
- ./cluster.yaml
- ./flux.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@
# yaml-language-server: $schema=https://json.schemastore.org/kustomization
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
namespace: flux-system
resources: []
Loading
Loading