mirror of
https://github.com/onedr0p/cluster-template.git
synced 2026-03-03 06:10:30 +00:00
Compare commits
317 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a79311746f | ||
|
|
0f808e2e48 | ||
|
|
e26d350966 | ||
|
|
2b197b8d47 | ||
|
|
6a88d02532 | ||
|
|
91fb2aedc3 | ||
|
|
ccb35dff71 | ||
|
|
d0ae7f2c90 | ||
|
|
2949911568 | ||
|
|
68da126acf | ||
|
|
080da2a1d4 | ||
|
|
5b0a098223 | ||
|
|
adf1054c24 | ||
|
|
1cf56473eb | ||
|
|
a850890ce6 | ||
|
|
55b24ac369 | ||
|
|
6ad0de136f | ||
|
|
30d8fdfbdc | ||
|
|
d96e839c04 | ||
|
|
f35a6ba7f7 | ||
|
|
62e5f875a8 | ||
|
|
c0629a2f48 | ||
|
|
2fb226ba78 | ||
|
|
87a2e91557 | ||
|
|
56878e29da | ||
|
|
8bce2e8d73 | ||
|
|
dde2085b96 | ||
|
|
52064de097 | ||
|
|
cc4c26fc04 | ||
|
|
fd20b5ef08 | ||
|
|
97b904ce2f | ||
|
|
8c40ea0860 | ||
|
|
f3bc0fd858 | ||
|
|
8e3f0f7360 | ||
|
|
be346add11 | ||
|
|
d21c5a3663 | ||
|
|
1a861ba443 | ||
|
|
922488bd98 | ||
|
|
24bf17db4f | ||
|
|
b3e593fab0 | ||
|
|
cc9d4e3d95 | ||
|
|
2c473d802c | ||
|
|
b9bf6e754e | ||
|
|
4f4b018e5e | ||
|
|
7b1c5b9cef | ||
|
|
183ca630a4 | ||
|
|
8dd895355c | ||
|
|
d60629b654 | ||
|
|
9e459236a1 | ||
|
|
5bc713b62e | ||
|
|
0785808104 | ||
|
|
0816f75886 | ||
|
|
5e56d0f0a2 | ||
|
|
3886fbe520 | ||
|
|
d0ed9107b4 | ||
|
|
f311a5ea2f | ||
|
|
b17532ccd3 | ||
|
|
c592b8a7ae | ||
|
|
82422d97dc | ||
|
|
6bcb7c2766 | ||
|
|
a25598e1d3 | ||
|
|
6c4cbcb9a5 | ||
|
|
5bc6f2c63e | ||
|
|
5e6697b7e7 | ||
|
|
2cd8e4d123 | ||
|
|
fe77400a53 | ||
|
|
8aed032e0d | ||
|
|
2617fc01d3 | ||
|
|
f4f8f3a1e7 | ||
|
|
c675ad00dc | ||
|
|
223decd6b6 | ||
|
|
a24162b36a | ||
|
|
9e6a7d7de6 | ||
|
|
cdd4c33938 | ||
|
|
40c5b938e6 | ||
|
|
f257cd078b | ||
|
|
c0c4524828 | ||
|
|
f778ffd052 | ||
|
|
cfeaa16441 | ||
|
|
1cbd1faab0 | ||
|
|
2ac27e18f1 | ||
|
|
1e8b8b3dd5 | ||
|
|
8a49b7f45c | ||
|
|
6d22e69d27 | ||
|
|
99d175c8e2 | ||
|
|
fb0a6a12f9 | ||
|
|
a1e88e878c | ||
|
|
af186dbe5d | ||
|
|
7cc95d3241 | ||
|
|
5cd38a4383 | ||
|
|
89b8da3f45 | ||
|
|
7623eaf947 | ||
|
|
2bebaf6a2f | ||
|
|
86302aaa72 | ||
|
|
fe698f1ab1 | ||
|
|
6884de642f | ||
|
|
24d5b826f6 | ||
|
|
b0971242f7 | ||
|
|
9a2cb1fa3b | ||
|
|
99e670aa85 | ||
|
|
4eeb49c9cd | ||
|
|
76dd86e878 | ||
|
|
467f1b3634 | ||
|
|
e4474ef6b6 | ||
|
|
dcafb24ad2 | ||
|
|
3e4a3ef36f | ||
|
|
3dd05b2883 | ||
|
|
778fcc4e3b | ||
|
|
3c17e076ea | ||
|
|
06edc1753d | ||
|
|
ce63f8225f | ||
|
|
56a762ef87 | ||
|
|
9031abaa06 | ||
|
|
db9f0ff7a4 | ||
|
|
97e2c61865 | ||
|
|
333bae6447 | ||
|
|
3975fff171 | ||
|
|
35996440e3 | ||
|
|
662f244401 | ||
|
|
855becb3bf | ||
|
|
f5dae5a666 | ||
|
|
d2a8f117af | ||
|
|
7d88f1518e | ||
|
|
239b38295a | ||
|
|
43376e2e60 | ||
|
|
67f47e1bf7 | ||
|
|
aebf566f23 | ||
|
|
530438ef40 | ||
|
|
58ca670090 | ||
|
|
8dc1d6ae26 | ||
|
|
a564dfad24 | ||
|
|
9a2190b1cb | ||
|
|
867c865723 | ||
|
|
1e5ec86683 | ||
|
|
a5dbd79c54 | ||
|
|
2171f3ddaf | ||
|
|
4f139e6590 | ||
|
|
58dc733461 | ||
|
|
4a791c88cf | ||
|
|
ec6bf70eb6 | ||
|
|
c3d5a004a8 | ||
|
|
0216e36f9c | ||
|
|
8ef2f9d1bb | ||
|
|
dae0dbee0d | ||
|
|
c553312119 | ||
|
|
44d6be26b6 | ||
|
|
6de0c86710 | ||
|
|
3143a47c61 | ||
|
|
c6779d39a0 | ||
|
|
6ca9318aa7 | ||
|
|
2bab9baecf | ||
|
|
4f0a57b645 | ||
|
|
754a13a815 | ||
|
|
42167ee6aa | ||
|
|
cb89ff5425 | ||
|
|
773e8ec404 | ||
|
|
057c9dcbb2 | ||
|
|
7f04993c48 | ||
|
|
e1a0fa5e44 | ||
|
|
4054dad3ef | ||
|
|
290d9201e2 | ||
|
|
81e8caead2 | ||
|
|
885057f912 | ||
|
|
4c0efbb18d | ||
|
|
1762c86490 | ||
|
|
c43ababf00 | ||
|
|
b846e30152 | ||
|
|
d2fa7c478b | ||
|
|
5b1c85792b | ||
|
|
d6fafbf735 | ||
|
|
b793f07bfc | ||
|
|
07680c967b | ||
|
|
6d1119a2e1 | ||
|
|
9e079595de | ||
|
|
8907757a70 | ||
|
|
43ce82058d | ||
|
|
502681781a | ||
|
|
006696d87f | ||
|
|
b8b164f931 | ||
|
|
7c5518199f | ||
|
|
735ff2c1ba | ||
|
|
e578527148 | ||
|
|
826bdd6e56 | ||
|
|
e9e2297350 | ||
|
|
49353ee17c | ||
|
|
ca3aa47da0 | ||
|
|
e9daab2adf | ||
|
|
02a15b3b78 | ||
|
|
1427c95167 | ||
|
|
7a3a216a19 | ||
|
|
d61fbd08ad | ||
|
|
4f87ae748f | ||
|
|
d6bda80aaf | ||
|
|
7007835b41 | ||
|
|
6f066ebe15 | ||
|
|
831cec446c | ||
|
|
5475d33e3e | ||
|
|
7727943008 | ||
|
|
c1c365c3c8 | ||
|
|
90fc72a6f1 | ||
|
|
f6e9f8598b | ||
|
|
879f17d477 | ||
|
|
649478fb06 | ||
|
|
bf0ec86740 | ||
|
|
c757e9331d | ||
|
|
77ca7d2998 | ||
|
|
e58a84f9b1 | ||
|
|
e9a4dc8a5e | ||
|
|
1e05f38f43 | ||
|
|
23d5a00a45 | ||
|
|
82a68fcd59 | ||
|
|
4f6c4feb0f | ||
|
|
16a144e654 | ||
|
|
fc97512b14 | ||
|
|
67e39f298b | ||
|
|
3401fcb5eb | ||
|
|
c4b5cd4d1a | ||
|
|
0628925610 | ||
|
|
4656ad7d09 | ||
|
|
65eb01e172 | ||
|
|
5e90b3c1a3 | ||
|
|
9f0406e482 | ||
|
|
e6f368a76b | ||
|
|
1de5259240 | ||
|
|
3b218a4f43 | ||
|
|
81964af988 | ||
|
|
b219f792ef | ||
|
|
8189126c5d | ||
|
|
7a83c819e4 | ||
|
|
632bf35507 | ||
|
|
b1e2aa9ed9 | ||
|
|
2c1a4e3dd3 | ||
|
|
31afb30961 | ||
|
|
7f257bfa62 | ||
|
|
b7bd604568 | ||
|
|
129d8bd92d | ||
|
|
c69a0ab8df | ||
|
|
5f78c89a6e | ||
|
|
46be724751 | ||
|
|
295f495205 | ||
|
|
bb292ac27d | ||
|
|
b23b480dc5 | ||
|
|
41326abae6 | ||
|
|
fbc602fe38 | ||
|
|
16ffa092b2 | ||
|
|
11f4a1731e | ||
|
|
c678ab7535 | ||
|
|
3398d67cda | ||
|
|
55726ef788 | ||
|
|
77c39856d6 | ||
|
|
e12247c974 | ||
|
|
cb9d943cb3 | ||
|
|
ff837b90ae | ||
|
|
ee07fa5467 | ||
|
|
3d22ff06cd | ||
|
|
0105eb5776 | ||
|
|
dbdf1b960c | ||
|
|
00ae9a4c69 | ||
|
|
c960edeeea | ||
|
|
c47bd71043 | ||
|
|
0ebd6b8884 | ||
|
|
f0ec01f979 | ||
|
|
ec452c9d6c | ||
|
|
f42d85ecda | ||
|
|
63b67b99be | ||
|
|
ceed1912df | ||
|
|
1d9fb298d9 | ||
|
|
3461e65bc6 | ||
|
|
5389fe31c4 | ||
|
|
beada43f73 | ||
|
|
d564969646 | ||
|
|
317db1721a | ||
|
|
fab2b50903 | ||
|
|
2f91966224 | ||
|
|
26bce0e92a | ||
|
|
e0f7813d73 | ||
|
|
9cd87b6ccf | ||
|
|
3a4016a975 | ||
|
|
93b46772c0 | ||
|
|
fc8dc142d3 | ||
|
|
a72568b4fd | ||
|
|
e3fbdd7de9 | ||
|
|
60a3daee46 | ||
|
|
4f9d1d34b6 | ||
|
|
af1d513ee6 | ||
|
|
b356905bcc | ||
|
|
cf12f8bb75 | ||
|
|
2a4c6ab9e5 | ||
|
|
1bd3c8e83f | ||
|
|
028d80c71d | ||
|
|
7c4dcec0f5 | ||
|
|
0003b4e78f | ||
|
|
e23f7363bd | ||
|
|
faa96a7a25 | ||
|
|
eae5ca8884 | ||
|
|
ddc6506e47 | ||
|
|
9cf3b1d806 | ||
|
|
77c7670ca3 | ||
|
|
4fa6c092df | ||
|
|
0e7a4deffb | ||
|
|
a8c4dfe2e7 | ||
|
|
40500633e0 | ||
|
|
2c10a16b7b | ||
|
|
dc99a5e15f | ||
|
|
27b73bcdd3 | ||
|
|
40e924618e | ||
|
|
82a113c904 | ||
|
|
5072fb9bc3 | ||
|
|
0d087e75fd | ||
|
|
cc96afaa66 | ||
|
|
015a2cb57c | ||
|
|
a4517ffc99 | ||
|
|
13ac3bf278 | ||
|
|
75b94455a8 | ||
|
|
97000499e0 | ||
|
|
0fc9280182 | ||
|
|
6229517149 |
3
.github/tests/nodes.yaml
vendored
3
.github/tests/nodes.yaml
vendored
@@ -14,3 +14,6 @@ nodes:
|
||||
mtu: 1500
|
||||
secureboot: true
|
||||
encrypt_disk: true
|
||||
kernel_modules:
|
||||
- nvidia
|
||||
- nvidia_uvm
|
||||
|
||||
7
.github/workflows/e2e.yaml
vendored
7
.github/workflows/e2e.yaml
vendored
@@ -1,5 +1,4 @@
|
||||
---
|
||||
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
|
||||
name: "e2e"
|
||||
|
||||
on:
|
||||
@@ -26,10 +25,10 @@ jobs:
|
||||
- private
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
|
||||
- name: Setup mise
|
||||
uses: jdx/mise-action@5ac50f778e26fac95da98d50503682459e86d566 # v3.2.0
|
||||
uses: jdx/mise-action@6d1e696aa24c1aa1bcc1adea0212707c71ab78a8 # v3.6.1
|
||||
env:
|
||||
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
|
||||
with:
|
||||
@@ -55,7 +54,7 @@ jobs:
|
||||
task talos:generate-config
|
||||
|
||||
- name: Run flux-local test
|
||||
uses: docker://ghcr.io/allenporter/flux-local:v7.8.0@sha256:e8cd431e824eddd169763e02ef73ebb76c40740f1e1e67f6234a29b28304ce9c
|
||||
uses: docker://ghcr.io/allenporter/flux-local:v8.1.0@sha256:37c3c4309a351830b04f93c323adfcb0e28c368001818cd819cbce3e08828261
|
||||
with:
|
||||
args: test --enable-helm --all-namespaces --path /github/workspace/kubernetes/flux/cluster -v
|
||||
|
||||
|
||||
15
.github/workflows/flux-local.yaml
vendored
15
.github/workflows/flux-local.yaml
vendored
@@ -1,5 +1,4 @@
|
||||
---
|
||||
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
|
||||
name: "Flux Local"
|
||||
|
||||
on:
|
||||
@@ -18,11 +17,11 @@ jobs:
|
||||
any_changed: ${{ steps.changed-files.outputs.any_changed }}
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
|
||||
- name: Get Changed Files
|
||||
id: changed-files
|
||||
uses: tj-actions/changed-files@ed68ef82c095e0d48ec87eccea555d944a631a4c # v46.0.5
|
||||
uses: tj-actions/changed-files@7dee1b0c1557f278e5c7dc244927139d78c0e22a # v47.0.4
|
||||
with:
|
||||
files: kubernetes/**
|
||||
|
||||
@@ -33,10 +32,10 @@ jobs:
|
||||
if: ${{ needs.pre-job.outputs.any_changed == 'true' }}
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
|
||||
- name: Run flux-local test
|
||||
uses: docker://ghcr.io/allenporter/flux-local:v7.8.0
|
||||
uses: docker://ghcr.io/allenporter/flux-local:v8.1.0
|
||||
with:
|
||||
args: test --enable-helm --all-namespaces --path /github/workspace/kubernetes/flux/cluster -v
|
||||
|
||||
@@ -55,18 +54,18 @@ jobs:
|
||||
if: ${{ needs.pre-job.outputs.any_changed == 'true' }}
|
||||
steps:
|
||||
- name: Checkout Pull Request Branch
|
||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
with:
|
||||
path: pull
|
||||
|
||||
- name: Checkout Default Branch
|
||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
with:
|
||||
ref: "${{ github.event.repository.default_branch }}"
|
||||
path: default
|
||||
|
||||
- name: Run flux-local diff
|
||||
uses: docker://ghcr.io/allenporter/flux-local:v7.8.0
|
||||
uses: docker://ghcr.io/allenporter/flux-local:v8.1.0
|
||||
with:
|
||||
args: >-
|
||||
diff ${{ matrix.resources }}
|
||||
|
||||
3
.github/workflows/label-sync.yaml
vendored
3
.github/workflows/label-sync.yaml
vendored
@@ -1,5 +1,4 @@
|
||||
---
|
||||
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
|
||||
name: "Label Sync"
|
||||
|
||||
on:
|
||||
@@ -17,7 +16,7 @@ jobs:
|
||||
issues: write
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
|
||||
- name: Sync Labels
|
||||
uses: EndBug/label-sync@52074158190acb45f3077f9099fea818aa43f97a # v2.3.3
|
||||
|
||||
3
.github/workflows/labeler.yaml
vendored
3
.github/workflows/labeler.yaml
vendored
@@ -1,5 +1,4 @@
|
||||
---
|
||||
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
|
||||
name: "Labeler"
|
||||
|
||||
on:
|
||||
@@ -17,6 +16,6 @@ jobs:
|
||||
issues: write
|
||||
steps:
|
||||
- name: Labeler
|
||||
uses: actions/labeler@8558fd74291d67161a8a78ce36a881fa63b766a9 # v5.0.0
|
||||
uses: actions/labeler@634933edcd8ababfe52f92936142cc22ac488b1b # v6.0.1
|
||||
with:
|
||||
configuration-path: .github/labeler.yaml
|
||||
|
||||
7
.github/workflows/release.yaml
vendored
7
.github/workflows/release.yaml
vendored
@@ -1,5 +1,4 @@
|
||||
---
|
||||
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
|
||||
name: "Release"
|
||||
|
||||
on:
|
||||
@@ -11,10 +10,12 @@ jobs:
|
||||
release:
|
||||
name: Release
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: write
|
||||
steps:
|
||||
- name: Get Previous Release Tag and Determine Next Tag
|
||||
id: determine-next-tag
|
||||
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
|
||||
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
|
||||
with:
|
||||
github-token: "${{ secrets.GITHUB_TOKEN }}"
|
||||
result-encoding: string
|
||||
@@ -48,7 +49,7 @@ jobs:
|
||||
return `${nextMajorMinor}.${nextPatch}`;
|
||||
|
||||
- name: Create Release
|
||||
uses: ncipollo/release-action@bcfe5470707e8832e12347755757cec0eb3c22af # v1.18.0
|
||||
uses: ncipollo/release-action@b7eabc95ff50cbeeedec83973935c8f306dfcd0b # v1.20.0
|
||||
with:
|
||||
generateReleaseNotes: true
|
||||
tag: "${{ steps.determine-next-tag.outputs.result }}"
|
||||
|
||||
38
.mise.toml
38
.mise.toml
@@ -1,26 +1,28 @@
|
||||
[env]
|
||||
_.python.venv = { path = "{{config_root}}/.venv", create = true }
|
||||
_.python.venv = { path = "{{config_root}}/.venv", create = true } # required:template
|
||||
KUBECONFIG = "{{config_root}}/kubeconfig"
|
||||
SOPS_AGE_KEY_FILE = "{{config_root}}/age.key"
|
||||
TALOSCONFIG = "{{config_root}}/talos/clusterconfig/talosconfig"
|
||||
|
||||
[tools]
|
||||
"python" = "3.13"
|
||||
"pipx:makejinja" = "2.8.1"
|
||||
"aqua:budimanjojo/talhelper" = "3.0.33"
|
||||
"aqua:cilium/cilium-cli" = "0.18.6"
|
||||
"aqua:cli/cli" = "2.78.0"
|
||||
"aqua:cloudflare/cloudflared" = "2025.8.1"
|
||||
"aqua:cue-lang/cue" = "0.14.1"
|
||||
"aqua:FiloSottile/age" = "1.2.1"
|
||||
"aqua:fluxcd/flux2" = "2.6.4"
|
||||
"aqua:getsops/sops" = "3.10.2"
|
||||
"aqua:go-task/task" = "3.44.1"
|
||||
"aqua:helm/helm" = "3.18.6"
|
||||
"aqua:helmfile/helmfile" = "1.1.5"
|
||||
"python" = "3.14.3" # required:template
|
||||
"uv" = "0.10.7" # required:template
|
||||
"pipx" = "1.8.0" # required:template
|
||||
"pipx:makejinja" = "2.8.2" # required:template
|
||||
"aqua:budimanjojo/talhelper" = "3.1.5"
|
||||
"aqua:cilium/cilium-cli" = "0.19.2"
|
||||
"aqua:cli/cli" = "2.87.3"
|
||||
"aqua:cloudflare/cloudflared" = "2026.2.0"
|
||||
"aqua:cue-lang/cue" = "0.15.4" # required:template
|
||||
"aqua:FiloSottile/age" = "1.3.1"
|
||||
"aqua:fluxcd/flux2" = "2.8.1"
|
||||
"aqua:getsops/sops" = "3.12.1"
|
||||
"aqua:go-task/task" = "3.48.0"
|
||||
"aqua:helm/helm" = "4.1.1"
|
||||
"aqua:helmfile/helmfile" = "1.3.2"
|
||||
"aqua:jqlang/jq" = "1.8.1"
|
||||
"aqua:kubernetes-sigs/kustomize" = "5.7.0"
|
||||
"aqua:kubernetes/kubectl" = "1.33.2"
|
||||
"aqua:mikefarah/yq" = "4.47.1"
|
||||
"aqua:siderolabs/talos" = "1.10.7"
|
||||
"aqua:kubernetes-sigs/kustomize" = "5.7.1"
|
||||
"aqua:kubernetes/kubernetes/kubectl" = "1.35.2"
|
||||
"aqua:mikefarah/yq" = "4.52.4"
|
||||
"aqua:siderolabs/talos" = "1.12.4"
|
||||
"aqua:yannh/kubeconform" = "0.7.0"
|
||||
|
||||
@@ -10,17 +10,17 @@
|
||||
":semanticCommits",
|
||||
],
|
||||
dependencyDashboard: true,
|
||||
dependencyDashboardTitle: "Renovate Dashboard 🤖",
|
||||
dependencyDashboardTitle: "Renovate Dashboard :robot:",
|
||||
schedule: ["every weekend"],
|
||||
ignorePaths: ["**/*.sops.*"],
|
||||
flux: {
|
||||
managerFilePatterns: ["/(^|/)kubernetes/.+\\.ya?ml(?:\\.j2)?$/"],
|
||||
},
|
||||
"helm-values": {
|
||||
managerFilePatterns: ["/(^|/)kubernetes/.+\\.ya?ml(?:\\.j2)?$/"],
|
||||
},
|
||||
helmfile: {
|
||||
managerFilePatterns: ["/(^|/)helmfile\\.ya?ml(?:\\.j2)?$/"],
|
||||
managerFilePatterns: [
|
||||
"/(^|/)helmfile\\.ya?ml(?:\\.gotmpl)?(?:\\.j2)?$/",
|
||||
"/(^|/)helmfile\\.d/.+\\.ya?ml(?:\\.gotmpl)?(?:\\.j2)?$/",
|
||||
],
|
||||
},
|
||||
kubernetes: {
|
||||
managerFilePatterns: ["/(^|/)kubernetes/.+\\.ya?ml(?:\\.j2)?$/"],
|
||||
@@ -39,11 +39,11 @@
|
||||
description: "Flux Operator Group",
|
||||
groupName: "flux-operator",
|
||||
matchDatasources: ["docker"],
|
||||
matchPackageNames: ["/flux-operator/", "/flux-instance/"],
|
||||
matchPackageNames: ["/flux-operator/", "/flux-instance/", "/flux-operator-manifests/"],
|
||||
group: {
|
||||
commitMessageTopic: "{{{groupName}}} group",
|
||||
},
|
||||
minimumGroupSize: 2,
|
||||
minimumGroupSize: 3,
|
||||
},
|
||||
{
|
||||
description: "Auto-merge GitHub Actions",
|
||||
@@ -54,14 +54,6 @@
|
||||
minimumReleaseAge: "3 days",
|
||||
ignoreTests: true,
|
||||
},
|
||||
{
|
||||
description: "Auto-merge Mise Tools",
|
||||
matchManagers: ["mise"],
|
||||
automerge: true,
|
||||
automergeType: "branch",
|
||||
matchUpdateTypes: ["minor", "patch"],
|
||||
ignoreTests: true,
|
||||
},
|
||||
{
|
||||
matchUpdateTypes: ["major"],
|
||||
semanticCommitType: "feat",
|
||||
@@ -121,6 +113,10 @@
|
||||
matchUpdateTypes: ["patch"],
|
||||
labels: ["type/patch"],
|
||||
},
|
||||
{
|
||||
matchUpdateTypes: ["digest"],
|
||||
labels: ["type/digest"],
|
||||
},
|
||||
{
|
||||
matchDatasources: ["docker"],
|
||||
addLabels: ["renovate/container"],
|
||||
@@ -161,5 +157,16 @@
|
||||
],
|
||||
datasourceTemplate: "{{#if datasource}}{{{datasource}}}{{else}}github-releases{{/if}}",
|
||||
},
|
||||
{
|
||||
customType: "regex",
|
||||
description: "Process OCI dependencies",
|
||||
managerFilePatterns: [
|
||||
"/\\.yaml(?:\\.j2)?$/",
|
||||
],
|
||||
matchStrings: [
|
||||
"oci://(?<depName>[^:]+):(?<currentValue>\\S+)",
|
||||
],
|
||||
datasourceTemplate: "docker",
|
||||
},
|
||||
],
|
||||
}
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
---
|
||||
# yaml-language-server: $schema=https://taskfile.dev/schema.json
|
||||
version: '3'
|
||||
|
||||
tasks:
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
---
|
||||
# yaml-language-server: $schema=https://taskfile.dev/schema.json
|
||||
version: '3'
|
||||
|
||||
tasks:
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
---
|
||||
# yaml-language-server: $schema=https://taskfile.dev/schema.json
|
||||
version: '3'
|
||||
|
||||
vars:
|
||||
@@ -38,7 +37,7 @@ tasks:
|
||||
|
||||
generate-deploy-key:
|
||||
internal: true
|
||||
cmd: ssh-keygen -t ecdsa -b 521 -C "deploy-key" -f {{.ROOT_DIR}}/github-deploy.key -q -P ""
|
||||
cmd: ssh-keygen -t ed25519 -C "deploy-key" -f {{.ROOT_DIR}}/github-deploy.key -q -P ""
|
||||
status:
|
||||
- test -f {{.ROOT_DIR}}/github-deploy.key
|
||||
preconditions:
|
||||
@@ -94,7 +93,7 @@ tasks:
|
||||
cmds:
|
||||
- for: { var: SECRET_FILES }
|
||||
cmd: |
|
||||
if sops filestatus "{{.ITEM}}" | jq --exit-status ".encrypted == false" &>/dev/null; then
|
||||
if [ $(sops filestatus "{{.ITEM}}" | jq ".encrypted") == "false" ]; then
|
||||
sops --encrypt --in-place "{{.ITEM}}"
|
||||
fi
|
||||
vars:
|
||||
@@ -132,8 +131,8 @@ tasks:
|
||||
- which kubectl
|
||||
|
||||
tidy:
|
||||
desc: Archive template related files and directories
|
||||
prompt: All files and directories related to the templating process will be archived... continue?
|
||||
desc: Archive or remove all template related config
|
||||
prompt: All template related config will be archived or removed... continue?
|
||||
cmds:
|
||||
- mkdir -p {{.TIDY_FOLDER}}
|
||||
- rm -rf {{.ROOT_DIR}}/.github/tests
|
||||
@@ -149,6 +148,9 @@ tasks:
|
||||
- |
|
||||
{{.SED}} -i '/template:/d' {{.ROOT_DIR}}/Taskfile.yaml
|
||||
- mv {{.ROOT_DIR}}/.taskfiles/template {{.TIDY_FOLDER}}/.taskfiles/
|
||||
- |
|
||||
{{.SED}} -i '/required:template/d' {{.ROOT_DIR}}/.mise.toml
|
||||
- rm -rf {{.ROOT_DIR}}/.venv
|
||||
vars:
|
||||
TIDY_FOLDER: '{{.PRIVATE_DIR}}/{{now | unixEpoch}}'
|
||||
SED:
|
||||
|
||||
@@ -21,9 +21,10 @@ import (
|
||||
disk: string
|
||||
mac_addr: =~"^([0-9a-f]{2}[:]){5}([0-9a-f]{2})$"
|
||||
schematic_id: =~"^[a-z0-9]{64}$"
|
||||
mtu?: >=1450 & <=9000
|
||||
secureboot?: bool
|
||||
encrypt_disk?: bool
|
||||
mtu?: >=1450 & <=9000
|
||||
secureboot?: bool
|
||||
encrypt_disk?: bool
|
||||
kernel_modules?: [...string]
|
||||
}
|
||||
|
||||
#Config
|
||||
|
||||
3
.vscode/extensions.json
vendored
3
.vscode/extensions.json
vendored
@@ -3,6 +3,7 @@
|
||||
"blueglassblock.better-json5",
|
||||
"irongeek.vscode-env",
|
||||
"redhat.vscode-yaml",
|
||||
"signageos.signageos-vscode-sops"
|
||||
"signageos.signageos-vscode-sops",
|
||||
"hverlin.mise-vscode"
|
||||
]
|
||||
}
|
||||
|
||||
124
README.md
124
README.md
@@ -15,7 +15,7 @@ With this approach, you'll gain a solid foundation to build and manage your Kube
|
||||
A Kubernetes cluster deployed with [Talos Linux](https://github.com/siderolabs/talos) and an opinionated implementation of [Flux](https://github.com/fluxcd/flux2) using [GitHub](https://github.com/) as the Git provider, [sops](https://github.com/getsops/sops) to manage secrets and [cloudflared](https://github.com/cloudflare/cloudflared) to access applications external to your local network.
|
||||
|
||||
- **Required:** Some knowledge of [Containers](https://opencontainers.org/), [YAML](https://noyaml.com/), [Git](https://git-scm.com/), and a **Cloudflare account** with a **domain**.
|
||||
- **Included components:** [flux](https://github.com/fluxcd/flux2), [cilium](https://github.com/cilium/cilium), [cert-manager](https://github.com/cert-manager/cert-manager), [spegel](https://github.com/spegel-org/spegel), [reloader](https://github.com/stakater/Reloader), [external-dns](https://github.com/kubernetes-sigs/external-dns) and [cloudflared](https://github.com/cloudflare/cloudflared).
|
||||
- **Included components:** [flux](https://github.com/fluxcd/flux2), [cilium](https://github.com/cilium/cilium), [cert-manager](https://github.com/cert-manager/cert-manager), [spegel](https://github.com/spegel-org/spegel), [reloader](https://github.com/stakater/Reloader), [envoy-gateway](https://github.com/envoyproxy/gateway), [external-dns](https://github.com/kubernetes-sigs/external-dns) and [cloudflared](https://github.com/cloudflare/cloudflared).
|
||||
|
||||
**Other features include:**
|
||||
|
||||
@@ -28,9 +28,19 @@ Does this sound cool to you? If so, continue to read on! 👇
|
||||
|
||||
## 🚀 Let's Go!
|
||||
|
||||
There are **5 stages** outlined below for completing this project, make sure you follow the stages in order.
|
||||
There are **6 stages** outlined below for completing this project, make sure you follow the stages in order.
|
||||
|
||||
### Stage 1: Machine Preparation
|
||||
### Stage 1: Hardware Configuration
|
||||
|
||||
For a **stable** and **high-availability** production Kubernetes cluster, hardware selection is critical. NVMe/SSDs are strongly preferred over HDDs, and **Bare Metal is strongly recommended** over virtualized platforms like Proxmox.
|
||||
|
||||
Using **enterprise NVMe or SATA SSDs on Bare Metal** (even used drives) provides the most reliable performance and rock-solid stability. Consumer **NVMe or SATA SSDs**, on the other hand, carry risks such as latency spikes, corruption, and fsync delays, particularly in multi-node setups.
|
||||
|
||||
**Proxmox with enterprise drives can work** for testing or carefully tuned production clusters, but it introduces additional layers of potential I/O contention — especially if consumer drives are used. Any **replicated storage** (e.g., Rook-Ceph, Longhorn) should always use **dedicated disks separate from control plane and etcd nodes** to ensure reliability. Worker nodes are more flexible, but risky configurations should still be avoided for stateful workloads to maintain cluster stability.
|
||||
|
||||
These guidelines provide a strong baseline, but there are always exceptions and nuances. The best way to ensure your hardware configuration works is to **test it thoroughly and benchmark performance** under realistic workloads.
|
||||
|
||||
### Stage 2: Machine Preparation
|
||||
|
||||
> [!IMPORTANT]
|
||||
> If you have **3 or more nodes** it is recommended to make 3 of them controller nodes for a highly available control plane. This project configures **all nodes** to be able to run workloads. **Worker nodes** are therefore **optional**.
|
||||
@@ -40,7 +50,7 @@ There are **5 stages** outlined below for completing this project, make sure you
|
||||
> |---------|----------|---------------|---------------------------|
|
||||
> | Control/Worker | 4 | 16GB | 256GB SSD/NVMe |
|
||||
|
||||
1. Head over to the [Talos Linux Image Factory](https://factory.talos.dev) and follow the instructions. Be sure to only choose the **bare-minimum system extensions** as some might require additional configuration and prevent Talos from booting without it. You can always add system extensions after Talos is installed and working.
|
||||
1. Head over to the [Talos Linux Image Factory](https://factory.talos.dev) and follow the instructions. Be sure to only choose the **bare-minimum system extensions** as some might require additional configuration and prevent Talos from booting without it. Depending on your CPU start with the Intel/AMD system extensions (`i915`, `intel-ucode` & `mei` **or** `amdgpu` & `amd-ucode`), you can always add system extensions after Talos is installed and working.
|
||||
|
||||
2. This will eventually lead you to download a Talos Linux ISO (or for SBCs a RAW) image. Make sure to note the **schematic ID** you will need this later on.
|
||||
|
||||
@@ -52,19 +62,20 @@ There are **5 stages** outlined below for completing this project, make sure you
|
||||
nmap -Pn -n -p 50000 192.168.1.0/24 -vv | grep 'Discovered'
|
||||
```
|
||||
|
||||
### Stage 2: Local Workstation
|
||||
### Stage 3: Local Workstation
|
||||
|
||||
> [!TIP]
|
||||
> It is recommended to set the visibility of your repository to `Public` so you can easily request help if you get stuck.
|
||||
|
||||
1. Create a new repository by clicking the green `Use this template` button at the top of this page, then clone the new repo you just created and `cd` into it. Alternatively you can us the [GitHub CLI](https://cli.github.com/) ...
|
||||
1. Create a new repository by clicking the green `Use this template` button at the top of this page, then clone the new repo you just created and `cd` into it. Alternatively you can use the [GitHub CLI](https://cli.github.com/) ...
|
||||
|
||||
```sh
|
||||
export REPONAME="home-ops"
|
||||
gh repo create $REPONAME --template onedr0p/cluster-template --disable-wiki --public --clone && cd $REPONAME
|
||||
gh repo create $REPONAME --template onedr0p/cluster-template --public --clone
|
||||
cd $REPONAME
|
||||
```
|
||||
|
||||
2. **Install** the [Mise CLI](https://mise.jdx.dev/getting-started.html#installing-mise-cli) on your workstation.
|
||||
2. **Install** the [Mise CLI](https://mise.jdx.dev/getting-started.html#installing-mise-cli) on your local workstation.
|
||||
|
||||
3. **Activate** Mise in your shell by following the [activation guide](https://mise.jdx.dev/getting-started.html#activate-mise).
|
||||
|
||||
@@ -80,17 +91,17 @@ There are **5 stages** outlined below for completing this project, make sure you
|
||||
|
||||
📍 _**Having trouble compiling Python?** Try running `mise settings python.compile=0` and then run these commands again_
|
||||
|
||||
5. Logout of GitHub Container Registry (GHCR) as this may cause authorization problems when using the public registry:
|
||||
5. Logout of the GitHub Container Registry as this may cause authorization problems in future steps when using the public registry:
|
||||
|
||||
```sh
|
||||
docker logout ghcr.io
|
||||
helm registry logout ghcr.io
|
||||
```
|
||||
|
||||
### Stage 3: Cloudflare configuration
|
||||
### Stage 4: Cloudflare configuration
|
||||
|
||||
> [!WARNING]
|
||||
> If any of the commands fail with `command not found` or `unknown command` it means `mise` is either not install or configured incorrectly.
|
||||
> If any of the commands fail with `command not found` or `unknown command` it means `mise` is either not installed, activated or it could be configured incorrectly.
|
||||
|
||||
1. Create a Cloudflare API token for use with cloudflared and external-dns by reviewing the official [documentation](https://developers.cloudflare.com/fundamentals/api/get-started/create-token/) and following the instructions below.
|
||||
|
||||
@@ -107,7 +118,7 @@ There are **5 stages** outlined below for completing this project, make sure you
|
||||
cloudflared tunnel create --credentials-file cloudflare-tunnel.json kubernetes
|
||||
```
|
||||
|
||||
### Stage 4: Cluster configuration
|
||||
### Stage 5: Cluster configuration
|
||||
|
||||
1. Generate the config files from the sample files:
|
||||
|
||||
@@ -136,10 +147,10 @@ There are **5 stages** outlined below for completing this project, make sure you
|
||||
> [!TIP]
|
||||
> Using a **private repository**? Make sure to paste the public key from `github-deploy.key.pub` into the deploy keys section of your GitHub repository settings. This will make sure Flux has read/write access to your repository.
|
||||
|
||||
### Stage 5: Bootstrap Talos, Kubernetes, and Flux
|
||||
### Stage 6: Bootstrap Talos, Kubernetes, and Flux
|
||||
|
||||
> [!WARNING]
|
||||
> It might take a while for the cluster to be setup (10+ minutes is normal). During which time you will see a variety of error messages like: "couldn't get current server API group list," "error: no matching resources found", etc. 'Ready' will remain "False" as no CNI is deployed yet. **This is a normal.** If this step gets interrupted, e.g. by pressing <kbd>Ctrl</kbd> + <kbd>C</kbd>, you likely will need to [reset the cluster](#-reset) before trying again
|
||||
> It might take a while for the cluster to be setup (10+ minutes is normal). During which time you will see a variety of error messages like: "couldn't get current server API group list," "error: no matching resources found", etc. 'Ready' will remain "False" as no CNI is deployed yet. **This is normal.** If this step gets interrupted, e.g. by pressing <kbd>Ctrl</kbd> + <kbd>C</kbd>, you likely will need to [reset the cluster](#-reset) before trying again
|
||||
|
||||
1. Install Talos:
|
||||
|
||||
@@ -207,28 +218,28 @@ There are **5 stages** outlined below for completing this project, make sure you
|
||||
5. Check the status of your wildcard `Certificate`:
|
||||
|
||||
```sh
|
||||
kubectl -n kube-system describe certificates
|
||||
kubectl -n network describe certificates
|
||||
```
|
||||
|
||||
### 🌐 Public DNS
|
||||
|
||||
> [!TIP]
|
||||
> Use the `external` gateway on `HTTPRoutes` to make applications public to the internet.
|
||||
> Use the `envoy-external` gateway on `HTTPRoutes` to make applications public to the internet. These are also accessible on your private network once you set up split DNS.
|
||||
|
||||
The `external-dns` application created in the `network` namespace will handle creating public DNS records. By default, `echo` and the `flux-webhook` are the only subdomains reachable from the public internet. In order to make additional applications public you must **set the correct gateway** like in the HelmRelease for `echo`.
|
||||
|
||||
### 🏠 Home DNS
|
||||
|
||||
> [!TIP]
|
||||
> Use the `internal` gateway on `HTTPRoutes` to make applications private to your network. If you're having trouble with internal DNS resolution check out [this](https://github.com/onedr0p/cluster-template/discussions/719) GitHub discussion.
|
||||
> Use the `envoy-internal` gateway on `HTTPRoutes` to make applications private to your network. If you're having trouble with internal DNS resolution check out [this](https://github.com/onedr0p/cluster-template/discussions/719) GitHub discussion.
|
||||
|
||||
`k8s_gateway` will provide DNS resolution to external Kubernetes resources (i.e. points of entry to the cluster) from any device that uses your home DNS server. For this to work, your home DNS server must be configured to forward DNS queries for `${cloudflare_domain}` to `${cluster_dns_gateway_addr}` instead of the upstream DNS server(s) it normally uses. This is a form of **split DNS** (aka split-horizon DNS / conditional forwarding).
|
||||
|
||||
_... Nothing working? That is expected, this is DNS after all!_
|
||||
|
||||
### 🪝 Github Webhook
|
||||
### 🪝 GitHub Webhook
|
||||
|
||||
By default Flux will periodically check your git repository for changes. In-order to have Flux reconcile on `git push` you must configure Github to send `push` events to Flux.
|
||||
By default Flux will periodically check your git repository for changes. In-order to have Flux reconcile on `git push` you must configure GitHub to send `push` events to Flux.
|
||||
|
||||
1. Obtain the webhook path:
|
||||
|
||||
@@ -244,7 +255,7 @@ By default Flux will periodically check your git repository for changes. In-orde
|
||||
https://flux-webhook.${cloudflare_domain}/hook/12ebd1e363c641dc3c2e430ecf3cee2b3c7a5ac9e1234506f6f5f3ce1230e123
|
||||
```
|
||||
|
||||
3. Navigate to the settings of your repository on Github, under "Settings/Webhooks" press the "Add webhook" button. Fill in the webhook URL and your token from `github-push-token.txt`, Content type: `application/json`, Events: Choose Just the push event, and save.
|
||||
3. Navigate to the settings of your repository on GitHub, under "Settings/Webhooks" press the "Add webhook" button. Fill in the webhook URL and your token from `github-push-token.txt`, Content type: `application/json`, Events: Choose Just the push event, and save.
|
||||
|
||||
## 💥 Reset
|
||||
|
||||
@@ -289,6 +300,36 @@ task talos:upgrade-k8s
|
||||
# e.g. task talos:upgrade-k8s
|
||||
```
|
||||
|
||||
### ➕ Adding a node to your cluster
|
||||
|
||||
At some point you might want to expand your cluster to run more workloads and/or improve the reliability of your cluster. Keep in mind it is recommended to have an **odd number** of control plane nodes for quorum reasons.
|
||||
|
||||
You don't need to re-bootstrap the cluster to add new nodes. Follow these steps:
|
||||
|
||||
1. **Prepare the new node**: Review the [Stage 2: Machine Preparation](#stage-2-machine-preparation) section and boot your new node into maintenance mode.
|
||||
|
||||
2. **Get the node information**: While the node is in maintenance mode, retrieve the disk and MAC address information needed for configuration:
|
||||
|
||||
```sh
|
||||
talosctl get disks -n <ip> --insecure
|
||||
talosctl get links -n <ip> --insecure
|
||||
```
|
||||
|
||||
3. **Update the configuration**: Read the documentation for [talhelper](https://budimanjojo.github.io/talhelper/latest/) and extend the `talconfig.yaml` file manually with the new node information (including the disk and MAC address from step 2).
|
||||
|
||||
4. **Generate and apply the configuration**:
|
||||
|
||||
```sh
|
||||
# Render your talosconfig based on the talconfig.yaml file
|
||||
task talos:generate-config
|
||||
|
||||
# Apply the configuration to the node
|
||||
task talos:apply-node IP=?
|
||||
# e.g. task talos:apply-node IP=10.10.10.10
|
||||
```
|
||||
|
||||
The node should join the cluster automatically and workloads will be scheduled once they report as ready.
|
||||
|
||||
## 🤖 Renovate
|
||||
|
||||
[Renovate](https://www.mend.io/renovate) is a tool that automates dependency management. It is designed to scan your repository around the clock and open PRs for out-of-date dependencies it finds. Common dependencies it can discover are Helm charts, container images, GitHub Actions and more! In most cases merging a PR will cause Flux to apply the update to your cluster.
|
||||
@@ -317,13 +358,13 @@ Below is a general guide on trying to debug an issue with an resource or applica
|
||||
kubectl -n <namespace> get pods -o wide
|
||||
```
|
||||
|
||||
3. Check the logs of the pod if its there:
|
||||
3. Check the logs of the pod if it's there:
|
||||
|
||||
```sh
|
||||
kubectl -n <namespace> logs <pod-name> -f
|
||||
```
|
||||
|
||||
4. If a resource exists try to describe it to see what problems it might have:
|
||||
4. If a resource exists, try to describe it to see what problems it might have:
|
||||
|
||||
```sh
|
||||
kubectl -n <namespace> describe <resource> <name>
|
||||
@@ -363,7 +404,7 @@ Below are some optional considerations you may want to explore.
|
||||
|
||||
### DNS
|
||||
|
||||
The template uses [k8s_gateway](https://github.com/ori-edge/k8s_gateway) to provide DNS for your applications, consider exploring [external-dns](https://github.com/kubernetes-sigs/external-dns) as an alternative.
|
||||
The template uses [k8s_gateway](https://github.com/k8s-gateway/k8s_gateway) to provide DNS for your applications, consider exploring [external-dns](https://github.com/kubernetes-sigs/external-dns) as an alternative.
|
||||
|
||||
External-DNS offers broad support for various DNS providers, including but not limited to:
|
||||
|
||||
@@ -376,7 +417,7 @@ This flexibility allows you to integrate seamlessly with a range of DNS solution
|
||||
|
||||
### Secrets
|
||||
|
||||
SOPs is an excellent tool for managing secrets in a GitOps workflow. However, it can become cumbersome when rotating secrets or maintaining a single source of truth for secret items.
|
||||
SOPS is an excellent tool for managing secrets in a GitOps workflow. However, it can become cumbersome when rotating secrets or maintaining a single source of truth for secret items.
|
||||
|
||||
For a more streamlined approach to those issues, consider [External Secrets](https://external-secrets.io/latest/). This tool allows you to move away from SOPs and leverage an external provider for managing your secrets. External Secrets supports a wide range of providers, from cloud-based solutions to self-hosted options.
|
||||
|
||||
@@ -384,13 +425,11 @@ For a more streamlined approach to those issues, consider [External Secrets](htt
|
||||
|
||||
If your workloads require persistent storage with features like replication or connectivity to NFS, SMB, or iSCSI servers, there are several projects worth exploring:
|
||||
|
||||
- [rook-ceph](https://github.com/rook/rook)
|
||||
- [longhorn](https://github.com/longhorn/longhorn)
|
||||
- [openebs](https://github.com/openebs/openebs)
|
||||
- [rook-ceph](https://github.com/rook/rook) / [longhorn](https://github.com/longhorn/longhorn) / [openebs](https://github.com/openebs/openebs)
|
||||
- [democratic-csi](https://github.com/democratic-csi/democratic-csi)
|
||||
- [csi-driver-nfs](https://github.com/kubernetes-csi/csi-driver-nfs)
|
||||
- [csi-driver-smb](https://github.com/kubernetes-csi/csi-driver-smb)
|
||||
- [csi-driver-nfs](https://github.com/kubernetes-csi/csi-driver-nfs) / [csi-driver-smb](https://github.com/kubernetes-csi/csi-driver-smb)
|
||||
- [synology-csi](https://github.com/SynologyOpenSource/synology-csi)
|
||||
- [truenas-csi](https://github.com/truenas/truenas-csi) / [tns-csi](https://github.com/fenio/tns-csi)
|
||||
|
||||
These tools offer a variety of solutions to meet your persistent storage needs, whether you’re using cloud-native or self-hosted infrastructures.
|
||||
|
||||
@@ -402,27 +441,20 @@ Community member [@whazor](https://github.com/whazor) created [Kubesearch](https
|
||||
|
||||
### Community
|
||||
|
||||
- Make a post in this repository's Github [Discussions](https://github.com/onedr0p/cluster-template/discussions).
|
||||
- Make a post in this repository's GitHub [Discussions](https://github.com/onedr0p/cluster-template/discussions).
|
||||
- Start a thread in the `#support` or `#cluster-template` channels in the [Home Operations](https://discord.gg/home-operations) Discord server.
|
||||
|
||||
### GitHub Sponsors
|
||||
## 📺 Media
|
||||
|
||||
If you're having difficulty with this project, can't find the answers you need through the community support options above, or simply want to show your appreciation while gaining deeper insights, I’m offering one-on-one paid support through GitHub Sponsors for a limited time. Payment and scheduling will be coordinated through [GitHub Sponsors](https://github.com/sponsors/onedr0p).
|
||||
Check out these videos below. If you find them helpful, a like and subscribe goes a long way!
|
||||
|
||||
<details>
|
||||
|
||||
<summary>Click to expand the details</summary>
|
||||
|
||||
<br>
|
||||
|
||||
- **Rate**: $50/hour (no longer than 2 hours / day).
|
||||
- **What’s Included**: Assistance with deployment, debugging, or answering questions related to this project.
|
||||
- **What to Expect**:
|
||||
1. Sessions will focus on specific questions or issues you are facing.
|
||||
2. I will provide guidance, explanations, and actionable steps to help resolve your concerns.
|
||||
3. Support is limited to this project and does not extend to unrelated tools or custom feature development.
|
||||
|
||||
</details>
|
||||
<a href="https://youtube.com/watch?v=aeUKOpeoiUs">
|
||||
<img src="https://github.com/user-attachments/assets/2dab1c6f-7b27-4b94-a7ad-a6d9c5b17c78" alt="Youtube Video" width="300">
|
||||
</a>
|
||||
|
||||
<a href="https://youtube.com/watch?v=hoi2GzvJUXM">
|
||||
<img src="https://github.com/user-attachments/assets/5b939b90-0019-4515-b90c-321ffe7448cf" alt="Youtube Video" width="300">
|
||||
</a>
|
||||
|
||||
## 🙌 Related Projects
|
||||
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
---
|
||||
# yaml-language-server: $schema=https://taskfile.dev/schema.json
|
||||
version: '3'
|
||||
|
||||
set: [pipefail]
|
||||
|
||||
@@ -9,4 +9,5 @@ nodes: []
|
||||
# mtu: 1500 # (ADVANCED/OPTIONAL) MTU for the NIC. DEFAULT: 1500
|
||||
# secureboot: false # (ADVANCED/OPTIONAL) SecureBoot mode on UEFI platforms. Ref: https://www.talos.dev/latest/talos-guides/install/bare-metal-platforms/secureboot
|
||||
# encrypt_disk: false # (ADVANCED/OPTIONAL) TPM-based disk encryption. Ref: https://www.talos.dev/latest/talos-guides/install/bare-metal-platforms/secureboot
|
||||
# kernel_modules: [] # (ADVANCED/OPTIONAL) Only applicable if the `schematic_id` you've provided contains system extensions that require kernel modules to correctly load - Example: ["nvidia", "nvidia_uvm", "nvidia_drm", "nvidia_modeset", "zfs"]
|
||||
# ...
|
||||
|
||||
@@ -59,8 +59,8 @@ function apply_sops_secrets() {
|
||||
|
||||
local -r secrets=(
|
||||
"${ROOT_DIR}/bootstrap/github-deploy-key.sops.yaml"
|
||||
"${ROOT_DIR}/kubernetes/components/common/sops/cluster-secrets.sops.yaml"
|
||||
"${ROOT_DIR}/kubernetes/components/common/sops/sops-age.sops.yaml"
|
||||
"${ROOT_DIR}/bootstrap/sops-age.sops.yaml"
|
||||
"${ROOT_DIR}/kubernetes/components/sops/cluster-secrets.sops.yaml"
|
||||
)
|
||||
|
||||
for secret in "${secrets[@]}"; do
|
||||
@@ -88,33 +88,33 @@ function apply_sops_secrets() {
|
||||
function apply_crds() {
|
||||
log debug "Applying CRDs"
|
||||
|
||||
local -r crds=(
|
||||
# renovate: datasource=github-releases depName=kubernetes-sigs/external-dns
|
||||
https://raw.githubusercontent.com/kubernetes-sigs/external-dns/refs/tags/v0.18.0/config/crd/standard/dnsendpoints.externaldns.k8s.io.yaml
|
||||
# renovate: datasource=github-releases depName=kubernetes-sigs/gateway-api
|
||||
https://github.com/kubernetes-sigs/gateway-api/releases/download/v1.3.0/experimental-install.yaml
|
||||
# renovate: datasource=github-releases depName=prometheus-operator/prometheus-operator
|
||||
https://github.com/prometheus-operator/prometheus-operator/releases/download/v0.85.0/stripped-down-crds.yaml
|
||||
)
|
||||
local -r helmfile_file="${ROOT_DIR}/bootstrap/helmfile.d/00-crds.yaml"
|
||||
|
||||
for crd in "${crds[@]}"; do
|
||||
if kubectl diff --filename "${crd}" &>/dev/null; then
|
||||
log info "CRDs are up-to-date" "crd=${crd}"
|
||||
continue
|
||||
fi
|
||||
if kubectl apply --server-side --filename "${crd}" &>/dev/null; then
|
||||
log info "CRDs applied" "crd=${crd}"
|
||||
else
|
||||
log error "Failed to apply CRDs" "crd=${crd}"
|
||||
fi
|
||||
done
|
||||
if [[ ! -f "${helmfile_file}" ]]; then
|
||||
log fatal "File does not exist" "file" "${helmfile_file}"
|
||||
fi
|
||||
|
||||
if ! crds=$(helmfile --file "${helmfile_file}" template --quiet | yq eval-all --exit-status 'select(.kind == "CustomResourceDefinition")') || [[ -z "${crds}" ]]; then
|
||||
log fatal "Failed to render CRDs from Helmfile" "file" "${helmfile_file}"
|
||||
fi
|
||||
|
||||
if echo "${crds}" | kubectl diff --filename - &>/dev/null; then
|
||||
log info "CRDs are up-to-date"
|
||||
return
|
||||
fi
|
||||
|
||||
if ! echo "${crds}" | kubectl apply --server-side --filename - &>/dev/null; then
|
||||
log fatal "Failed to apply crds from Helmfile" "file" "${helmfile_file}"
|
||||
fi
|
||||
|
||||
log info "CRDs applied successfully"
|
||||
}
|
||||
|
||||
# Sync Helm releases
|
||||
function sync_helm_releases() {
|
||||
log debug "Syncing Helm releases"
|
||||
|
||||
local -r helmfile_file="${ROOT_DIR}/bootstrap/helmfile.yaml"
|
||||
local -r helmfile_file="${ROOT_DIR}/bootstrap/helmfile.d/01-apps.yaml"
|
||||
|
||||
if [[ ! -f "${helmfile_file}" ]]; then
|
||||
log error "File does not exist" "file=${helmfile_file}"
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
#% if repository_visibility == 'private' %#
|
||||
---
|
||||
# yaml-language-server: $schema=https://kubernetesjsonschema.dev/v1.18.1-standalone-strict/secret-v1.json
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
|
||||
25
templates/config/bootstrap/helmfile.d/00-crds.yaml.j2
Normal file
25
templates/config/bootstrap/helmfile.d/00-crds.yaml.j2
Normal file
@@ -0,0 +1,25 @@
|
||||
---
|
||||
|
||||
# This helmfile is for extracting and installing Custom Resource Definitions (CRDs) from Helm charts.
|
||||
# It is not intended to be used with helmfile apply or helmfile sync.
|
||||
|
||||
helmDefaults:
|
||||
args:
|
||||
- --include-crds
|
||||
- --no-hooks
|
||||
|
||||
releases:
|
||||
- name: cloudflare-dns
|
||||
namespace: network
|
||||
chart: oci://ghcr.io/home-operations/charts-mirror/external-dns
|
||||
version: 1.20.0
|
||||
|
||||
- name: envoy-gateway
|
||||
namespace: network
|
||||
chart: oci://mirror.gcr.io/envoyproxy/gateway-helm
|
||||
version: v1.7.0
|
||||
|
||||
- name: kube-prometheus-stack
|
||||
namespace: observability
|
||||
chart: oci://ghcr.io/prometheus-community/charts/kube-prometheus-stack
|
||||
version: 82.4.3
|
||||
@@ -1,5 +1,4 @@
|
||||
---
|
||||
# yaml-language-server: $schema=https://json.schemastore.org/helmfile
|
||||
|
||||
helmDefaults:
|
||||
cleanupOnFail: true
|
||||
@@ -9,35 +8,31 @@ helmDefaults:
|
||||
releases:
|
||||
- name: cilium
|
||||
namespace: kube-system
|
||||
atomic: true
|
||||
chart: oci://ghcr.io/home-operations/charts-mirror/cilium
|
||||
version: 1.18.1
|
||||
values: ['./values.yaml.gotmpl']
|
||||
chart: oci://quay.io/cilium/charts/cilium
|
||||
version: 1.19.1
|
||||
values: ['./templates/values.yaml.gotmpl']
|
||||
|
||||
- name: coredns
|
||||
namespace: kube-system
|
||||
atomic: true
|
||||
chart: oci://ghcr.io/coredns/charts/coredns
|
||||
version: 1.43.3
|
||||
values: ['./values.yaml.gotmpl']
|
||||
version: 1.45.2
|
||||
values: ['./templates/values.yaml.gotmpl']
|
||||
needs: ['kube-system/cilium']
|
||||
|
||||
#% if spegel_enabled %#
|
||||
- name: spegel
|
||||
namespace: kube-system
|
||||
atomic: true
|
||||
chart: oci://ghcr.io/spegel-org/helm-charts/spegel
|
||||
version: 0.3.0
|
||||
values: ['./values.yaml.gotmpl']
|
||||
version: 0.6.0
|
||||
values: ['./templates/values.yaml.gotmpl']
|
||||
needs: ['kube-system/coredns']
|
||||
#% endif %#
|
||||
|
||||
- name: cert-manager
|
||||
namespace: cert-manager
|
||||
atomic: true
|
||||
chart: oci://quay.io/jetstack/charts/cert-manager
|
||||
version: v1.18.2
|
||||
values: ['./values.yaml.gotmpl']
|
||||
version: v1.19.4
|
||||
values: ['./templates/values.yaml.gotmpl']
|
||||
#% if spegel_enabled %#
|
||||
needs: ['kube-system/spegel']
|
||||
#% else %#
|
||||
@@ -46,16 +41,14 @@ releases:
|
||||
|
||||
- name: flux-operator
|
||||
namespace: flux-system
|
||||
atomic: true
|
||||
chart: oci://ghcr.io/controlplaneio-fluxcd/charts/flux-operator
|
||||
version: 0.28.0
|
||||
values: ['./values.yaml.gotmpl']
|
||||
version: 0.43.0
|
||||
values: ['./templates/values.yaml.gotmpl']
|
||||
needs: ['cert-manager/cert-manager']
|
||||
|
||||
- name: flux-instance
|
||||
namespace: flux-system
|
||||
atomic: true
|
||||
chart: oci://ghcr.io/controlplaneio-fluxcd/charts/flux-instance
|
||||
version: 0.28.0
|
||||
values: ['./values.yaml.gotmpl']
|
||||
version: 0.43.0
|
||||
values: ['./templates/values.yaml.gotmpl']
|
||||
needs: ['flux-system/flux-operator']
|
||||
@@ -0,0 +1 @@
|
||||
{{ (fromYaml (readFile (printf "../../../kubernetes/apps/%s/%s/app/helmrelease.yaml" .Release.Namespace .Release.Name))).spec.values | toYaml }}
|
||||
@@ -3,5 +3,6 @@ apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: sops-age
|
||||
namespace: flux-system
|
||||
stringData:
|
||||
age.agekey: "#{ age_key('private') }#"
|
||||
@@ -1 +0,0 @@
|
||||
{{ exec "yq" (list "select(.kind == \"HelmRelease\").spec.values" (printf "../kubernetes/apps/%s/%s/app/helmrelease.yaml" .Release.Namespace .Release.Name)) }}
|
||||
@@ -1,14 +1,14 @@
|
||||
---
|
||||
# yaml-language-server: $schema=https://raw.githubusercontent.com/datreeio/CRDs-catalog/main/cert-manager.io/clusterissuer_v1.json
|
||||
apiVersion: cert-manager.io/v1
|
||||
kind: ClusterIssuer
|
||||
metadata:
|
||||
name: letsencrypt-production
|
||||
spec:
|
||||
acme:
|
||||
server: https://acme-v02.api.letsencrypt.org/directory
|
||||
privateKeySecretRef:
|
||||
name: letsencrypt-production
|
||||
profile: shortlived
|
||||
server: https://acme-v02.api.letsencrypt.org/directory
|
||||
solvers:
|
||||
- dns01:
|
||||
cloudflare:
|
||||
|
||||
@@ -1,35 +1,13 @@
|
||||
---
|
||||
# yaml-language-server: $schema=https://raw.githubusercontent.com/fluxcd-community/flux2-schemas/main/ocirepository-source-v1.json
|
||||
apiVersion: source.toolkit.fluxcd.io/v1
|
||||
kind: OCIRepository
|
||||
metadata:
|
||||
name: cert-manager
|
||||
spec:
|
||||
interval: 5m
|
||||
layerSelector:
|
||||
mediaType: application/vnd.cncf.helm.chart.content.v1.tar+gzip
|
||||
operation: copy
|
||||
ref:
|
||||
tag: v1.18.2
|
||||
url: oci://quay.io/jetstack/charts/cert-manager
|
||||
---
|
||||
# yaml-language-server: $schema=https://raw.githubusercontent.com/fluxcd-community/flux2-schemas/main/helmrelease-helm-v2.json
|
||||
apiVersion: helm.toolkit.fluxcd.io/v2
|
||||
kind: HelmRelease
|
||||
metadata:
|
||||
name: cert-manager
|
||||
spec:
|
||||
interval: 1h
|
||||
chartRef:
|
||||
kind: OCIRepository
|
||||
name: cert-manager
|
||||
install:
|
||||
remediation:
|
||||
retries: -1
|
||||
upgrade:
|
||||
cleanupOnFail: true
|
||||
remediation:
|
||||
retries: 3
|
||||
interval: 1h
|
||||
values:
|
||||
crds:
|
||||
enabled: true
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
---
|
||||
# yaml-language-server: $schema=https://json.schemastore.org/kustomization
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
resources:
|
||||
- ./clusterissuer.yaml
|
||||
- ./helmrelease.yaml
|
||||
- ./ocirepository.yaml
|
||||
- ./secret.sops.yaml
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
---
|
||||
apiVersion: source.toolkit.fluxcd.io/v1
|
||||
kind: OCIRepository
|
||||
metadata:
|
||||
name: cert-manager
|
||||
spec:
|
||||
interval: 15m
|
||||
layerSelector:
|
||||
mediaType: application/vnd.cncf.helm.chart.content.v1.tar+gzip
|
||||
operation: copy
|
||||
ref:
|
||||
tag: v1.19.4
|
||||
url: oci://quay.io/jetstack/charts/cert-manager
|
||||
@@ -1,5 +1,4 @@
|
||||
---
|
||||
# yaml-language-server: $schema=https://kubernetesjsonschema.dev/v1.18.1-standalone-strict/secret-v1.json
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
|
||||
@@ -1,23 +1,14 @@
|
||||
---
|
||||
# yaml-language-server: $schema=https://raw.githubusercontent.com/fluxcd-community/flux2-schemas/main/kustomization-kustomize-v1.json
|
||||
apiVersion: kustomize.toolkit.fluxcd.io/v1
|
||||
kind: Kustomization
|
||||
metadata:
|
||||
name: &app cert-manager
|
||||
namespace: &namespace cert-manager
|
||||
name: cert-manager
|
||||
spec:
|
||||
commonMetadata:
|
||||
labels:
|
||||
app.kubernetes.io/name: *app
|
||||
decryption:
|
||||
provider: sops
|
||||
secretRef:
|
||||
name: sops-age
|
||||
healthChecks:
|
||||
- apiVersion: helm.toolkit.fluxcd.io/v2
|
||||
kind: HelmRelease
|
||||
name: *app
|
||||
namespace: *namespace
|
||||
name: cert-manager
|
||||
namespace: cert-manager
|
||||
- apiVersion: cert-manager.io/v1
|
||||
kind: ClusterIssuer
|
||||
name: letsencrypt-production
|
||||
@@ -33,10 +24,8 @@ spec:
|
||||
- name: cluster-secrets
|
||||
kind: Secret
|
||||
prune: true
|
||||
retryInterval: 2m
|
||||
sourceRef:
|
||||
kind: GitRepository
|
||||
name: flux-system
|
||||
namespace: flux-system
|
||||
targetNamespace: *namespace
|
||||
timeout: 5m
|
||||
targetNamespace: cert-manager
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
---
|
||||
# yaml-language-server: $schema=https://json.schemastore.org/kustomization
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
namespace: cert-manager
|
||||
|
||||
components:
|
||||
- ../../components/common
|
||||
- ../../components/sops
|
||||
|
||||
resources:
|
||||
- ./namespace.yaml
|
||||
- ./cert-manager/ks.yaml
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Namespace
|
||||
metadata:
|
||||
name: cert-manager
|
||||
annotations:
|
||||
kustomize.toolkit.fluxcd.io/prune: disabled
|
||||
@@ -1,24 +1,13 @@
|
||||
---
|
||||
# yaml-language-server: $schema=https://raw.githubusercontent.com/fluxcd-community/flux2-schemas/main/helmrelease-helm-v2.json
|
||||
apiVersion: helm.toolkit.fluxcd.io/v2
|
||||
kind: HelmRelease
|
||||
metadata:
|
||||
name: echo
|
||||
spec:
|
||||
interval: 1h
|
||||
chartRef:
|
||||
kind: OCIRepository
|
||||
name: app-template
|
||||
install:
|
||||
remediation:
|
||||
retries: -1
|
||||
upgrade:
|
||||
cleanupOnFail: true
|
||||
remediation:
|
||||
retries: 3
|
||||
dependsOn:
|
||||
- name: cloudflare-tunnel
|
||||
namespace: network
|
||||
name: echo
|
||||
interval: 1h
|
||||
values:
|
||||
controllers:
|
||||
echo:
|
||||
@@ -27,7 +16,7 @@ spec:
|
||||
app:
|
||||
image:
|
||||
repository: ghcr.io/mendhak/http-https-echo
|
||||
tag: 37
|
||||
tag: 39
|
||||
env:
|
||||
HTTP_PORT: &port 80
|
||||
LOG_WITHOUT_NEWLINE: true
|
||||
@@ -73,8 +62,8 @@ spec:
|
||||
app:
|
||||
hostnames: ["{{ .Release.Name }}.${SECRET_DOMAIN}"]
|
||||
parentRefs:
|
||||
- name: external
|
||||
namespace: kube-system
|
||||
- name: envoy-external
|
||||
namespace: network
|
||||
sectionName: https
|
||||
rules:
|
||||
- backendRefs:
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
# yaml-language-server: $schema=https://json.schemastore.org/kustomization
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
resources:
|
||||
- ./helmrelease.yaml
|
||||
- ./ocirepository.yaml
|
||||
|
||||
@@ -1,14 +1,13 @@
|
||||
---
|
||||
# yaml-language-server: $schema=https://raw.githubusercontent.com/fluxcd-community/flux2-schemas/main/ocirepository-source-v1.json
|
||||
apiVersion: source.toolkit.fluxcd.io/v1
|
||||
kind: OCIRepository
|
||||
metadata:
|
||||
name: app-template
|
||||
name: echo
|
||||
spec:
|
||||
interval: 5m
|
||||
interval: 15m
|
||||
layerSelector:
|
||||
mediaType: application/vnd.cncf.helm.chart.content.v1.tar+gzip
|
||||
operation: copy
|
||||
ref:
|
||||
tag: 4.2.0
|
||||
tag: 4.6.2
|
||||
url: oci://ghcr.io/bjw-s-labs/helm/app-template
|
||||
@@ -1,18 +1,9 @@
|
||||
---
|
||||
# yaml-language-server: $schema=https://raw.githubusercontent.com/fluxcd-community/flux2-schemas/main/kustomization-kustomize-v1.json
|
||||
apiVersion: kustomize.toolkit.fluxcd.io/v1
|
||||
kind: Kustomization
|
||||
metadata:
|
||||
name: &app echo
|
||||
namespace: &namespace default
|
||||
name: echo
|
||||
spec:
|
||||
commonMetadata:
|
||||
labels:
|
||||
app.kubernetes.io/name: *app
|
||||
decryption:
|
||||
provider: sops
|
||||
secretRef:
|
||||
name: sops-age
|
||||
interval: 1h
|
||||
path: ./kubernetes/apps/default/echo/app
|
||||
postBuild:
|
||||
@@ -20,11 +11,9 @@ spec:
|
||||
- name: cluster-secrets
|
||||
kind: Secret
|
||||
prune: true
|
||||
retryInterval: 2m
|
||||
sourceRef:
|
||||
kind: GitRepository
|
||||
name: flux-system
|
||||
namespace: flux-system
|
||||
targetNamespace: *namespace
|
||||
timeout: 5m
|
||||
targetNamespace: default
|
||||
wait: false
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
---
|
||||
# yaml-language-server: $schema=https://json.schemastore.org/kustomization
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
namespace: default
|
||||
|
||||
components:
|
||||
- ../../components/common
|
||||
- ../../components/sops
|
||||
|
||||
resources:
|
||||
- ./namespace.yaml
|
||||
- ./echo/ks.yaml
|
||||
|
||||
@@ -2,6 +2,6 @@
|
||||
apiVersion: v1
|
||||
kind: Namespace
|
||||
metadata:
|
||||
name: not-used
|
||||
name: default
|
||||
annotations:
|
||||
kustomize.toolkit.fluxcd.io/prune: disabled
|
||||
@@ -1,44 +1,17 @@
|
||||
---
|
||||
# yaml-language-server: $schema=https://raw.githubusercontent.com/fluxcd-community/flux2-schemas/main/ocirepository-source-v1.json
|
||||
apiVersion: source.toolkit.fluxcd.io/v1
|
||||
kind: OCIRepository
|
||||
metadata:
|
||||
name: flux-instance
|
||||
spec:
|
||||
interval: 5m
|
||||
layerSelector:
|
||||
mediaType: application/vnd.cncf.helm.chart.content.v1.tar+gzip
|
||||
operation: copy
|
||||
ref:
|
||||
tag: 0.28.0
|
||||
url: oci://ghcr.io/controlplaneio-fluxcd/charts/flux-instance
|
||||
---
|
||||
# yaml-language-server: $schema=https://raw.githubusercontent.com/fluxcd-community/flux2-schemas/main/helmrelease-helm-v2.json
|
||||
apiVersion: helm.toolkit.fluxcd.io/v2
|
||||
kind: HelmRelease
|
||||
metadata:
|
||||
name: flux-instance
|
||||
spec:
|
||||
interval: 1h
|
||||
chartRef:
|
||||
kind: OCIRepository
|
||||
name: flux-instance
|
||||
install:
|
||||
remediation:
|
||||
retries: -1
|
||||
upgrade:
|
||||
cleanupOnFail: true
|
||||
remediation:
|
||||
strategy: rollback
|
||||
retries: 3
|
||||
dependsOn:
|
||||
- name: flux-operator
|
||||
namespace: flux-system
|
||||
interval: 1h
|
||||
values:
|
||||
instance:
|
||||
distribution:
|
||||
# renovate: datasource=github-releases depName=controlplaneio-fluxcd/distribution
|
||||
version: 2.6.4
|
||||
artifact: oci://ghcr.io/controlplaneio-fluxcd/flux-operator-manifests:v0.43.0
|
||||
cluster:
|
||||
networkPolicy: false
|
||||
components:
|
||||
@@ -139,3 +112,27 @@ spec:
|
||||
target:
|
||||
kind: Deployment
|
||||
name: helm-controller
|
||||
- # Controller-level SOPS decryption
|
||||
patch: |
|
||||
- op: add
|
||||
path: /spec/template/spec/containers/0/args/-
|
||||
value: --sops-age-secret=sops-age
|
||||
target:
|
||||
kind: Deployment
|
||||
name: kustomize-controller
|
||||
- # Watch configmaps and secrets attached to HelmReleases and Kustomizations
|
||||
patch: |-
|
||||
- op: add
|
||||
path: /spec/template/spec/containers/0/args/-
|
||||
value: --watch-configs-label-selector=owner!=helm
|
||||
target:
|
||||
kind: Deployment
|
||||
name: (helm-controller|kustomize-controller)
|
||||
- # Cancel health checks on new Kustomizations revisions
|
||||
patch: |-
|
||||
- op: add
|
||||
path: /spec/template/spec/containers/0/args/-
|
||||
value: --feature-gates=CancelHealthCheckOnNewRevision=true
|
||||
target:
|
||||
kind: Deployment
|
||||
name: kustomize-controller
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
---
|
||||
# yaml-language-server: $schema=https://github.com/datreeio/CRDs-catalog/raw/refs/heads/main/gateway.networking.k8s.io/httproute_v1.json
|
||||
apiVersion: gateway.networking.k8s.io/v1
|
||||
kind: HTTPRoute
|
||||
metadata:
|
||||
@@ -7,8 +6,8 @@ metadata:
|
||||
spec:
|
||||
hostnames: ["flux-webhook.${SECRET_DOMAIN}"]
|
||||
parentRefs:
|
||||
- name: external
|
||||
namespace: kube-system
|
||||
- name: envoy-external
|
||||
namespace: network
|
||||
sectionName: https
|
||||
rules:
|
||||
- backendRefs:
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
---
|
||||
# yaml-language-server: $schema=https://json.schemastore.org/kustomization
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
resources:
|
||||
- ./helmrelease.yaml
|
||||
- ./ocirepository.yaml
|
||||
- ./secret.sops.yaml
|
||||
- ./httproute.yaml
|
||||
- ./receiver.yaml
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
---
|
||||
apiVersion: source.toolkit.fluxcd.io/v1
|
||||
kind: OCIRepository
|
||||
metadata:
|
||||
name: flux-instance
|
||||
spec:
|
||||
interval: 15m
|
||||
layerSelector:
|
||||
mediaType: application/vnd.cncf.helm.chart.content.v1.tar+gzip
|
||||
operation: copy
|
||||
ref:
|
||||
tag: 0.43.0
|
||||
url: oci://ghcr.io/controlplaneio-fluxcd/charts/flux-instance
|
||||
@@ -1,5 +1,4 @@
|
||||
---
|
||||
# yaml-language-server: $schema=https://raw.githubusercontent.com/fluxcd-community/flux2-schemas/main/receiver-notification-v1.json
|
||||
apiVersion: notification.toolkit.fluxcd.io/v1
|
||||
kind: Receiver
|
||||
metadata:
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
---
|
||||
# yaml-language-server: $schema=https://kubernetesjsonschema.dev/v1.18.1-standalone-strict/secret-v1.json
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
|
||||
@@ -1,21 +1,11 @@
|
||||
---
|
||||
# yaml-language-server: $schema=https://raw.githubusercontent.com/fluxcd-community/flux2-schemas/main/kustomization-kustomize-v1.json
|
||||
apiVersion: kustomize.toolkit.fluxcd.io/v1
|
||||
kind: Kustomization
|
||||
metadata:
|
||||
name: &app flux-instance
|
||||
namespace: &namespace flux-system
|
||||
name: flux-instance
|
||||
spec:
|
||||
commonMetadata:
|
||||
labels:
|
||||
app.kubernetes.io/name: *app
|
||||
decryption:
|
||||
provider: sops
|
||||
secretRef:
|
||||
name: sops-age
|
||||
dependsOn:
|
||||
- name: flux-operator
|
||||
namespace: *namespace
|
||||
interval: 1h
|
||||
path: ./kubernetes/apps/flux-system/flux-instance/app
|
||||
postBuild:
|
||||
@@ -23,11 +13,9 @@ spec:
|
||||
- name: cluster-secrets
|
||||
kind: Secret
|
||||
prune: true
|
||||
retryInterval: 2m
|
||||
sourceRef:
|
||||
kind: GitRepository
|
||||
name: flux-system
|
||||
namespace: flux-system
|
||||
targetNamespace: *namespace
|
||||
timeout: 5m
|
||||
targetNamespace: flux-system
|
||||
wait: false
|
||||
|
||||
@@ -1,36 +1,13 @@
|
||||
---
|
||||
# yaml-language-server: $schema=https://raw.githubusercontent.com/fluxcd-community/flux2-schemas/main/ocirepository-source-v1.json
|
||||
apiVersion: source.toolkit.fluxcd.io/v1
|
||||
kind: OCIRepository
|
||||
metadata:
|
||||
name: flux-operator
|
||||
spec:
|
||||
interval: 5m
|
||||
layerSelector:
|
||||
mediaType: application/vnd.cncf.helm.chart.content.v1.tar+gzip
|
||||
operation: copy
|
||||
ref:
|
||||
tag: 0.28.0
|
||||
url: oci://ghcr.io/controlplaneio-fluxcd/charts/flux-operator
|
||||
---
|
||||
# yaml-language-server: $schema=https://raw.githubusercontent.com/fluxcd-community/flux2-schemas/main/helmrelease-helm-v2.json
|
||||
apiVersion: helm.toolkit.fluxcd.io/v2
|
||||
kind: HelmRelease
|
||||
metadata:
|
||||
name: flux-operator
|
||||
spec:
|
||||
interval: 1h
|
||||
chartRef:
|
||||
kind: OCIRepository
|
||||
name: flux-operator
|
||||
install:
|
||||
remediation:
|
||||
retries: -1
|
||||
upgrade:
|
||||
cleanupOnFail: true
|
||||
remediation:
|
||||
strategy: rollback
|
||||
retries: 3
|
||||
interval: 1h
|
||||
values:
|
||||
serviceMonitor:
|
||||
create: true
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
# yaml-language-server: $schema=https://json.schemastore.org/kustomization
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
resources:
|
||||
- ./helmrelease.yaml
|
||||
- ./ocirepository.yaml
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
---
|
||||
apiVersion: source.toolkit.fluxcd.io/v1
|
||||
kind: OCIRepository
|
||||
metadata:
|
||||
name: flux-operator
|
||||
spec:
|
||||
interval: 15m
|
||||
layerSelector:
|
||||
mediaType: application/vnd.cncf.helm.chart.content.v1.tar+gzip
|
||||
operation: copy
|
||||
ref:
|
||||
tag: 0.43.0
|
||||
url: oci://ghcr.io/controlplaneio-fluxcd/charts/flux-operator
|
||||
@@ -1,23 +1,9 @@
|
||||
---
|
||||
# yaml-language-server: $schema=https://raw.githubusercontent.com/fluxcd-community/flux2-schemas/main/kustomization-kustomize-v1.json
|
||||
apiVersion: kustomize.toolkit.fluxcd.io/v1
|
||||
kind: Kustomization
|
||||
metadata:
|
||||
name: &app flux-operator
|
||||
namespace: &namespace flux-system
|
||||
name: flux-operator
|
||||
spec:
|
||||
commonMetadata:
|
||||
labels:
|
||||
app.kubernetes.io/name: *app
|
||||
decryption:
|
||||
provider: sops
|
||||
secretRef:
|
||||
name: sops-age
|
||||
healthChecks:
|
||||
- apiVersion: helm.toolkit.fluxcd.io/v2
|
||||
kind: HelmRelease
|
||||
name: *app
|
||||
namespace: *namespace
|
||||
interval: 1h
|
||||
path: ./kubernetes/apps/flux-system/flux-operator/app
|
||||
postBuild:
|
||||
@@ -25,11 +11,9 @@ spec:
|
||||
- name: cluster-secrets
|
||||
kind: Secret
|
||||
prune: true
|
||||
retryInterval: 2m
|
||||
sourceRef:
|
||||
kind: GitRepository
|
||||
name: flux-system
|
||||
namespace: flux-system
|
||||
targetNamespace: *namespace
|
||||
timeout: 5m
|
||||
wait: false
|
||||
targetNamespace: flux-system
|
||||
wait: true
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
---
|
||||
# yaml-language-server: $schema=https://json.schemastore.org/kustomization
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
namespace: flux-system
|
||||
|
||||
components:
|
||||
- ../../components/common
|
||||
- ../../components/sops
|
||||
|
||||
resources:
|
||||
- ./namespace.yaml
|
||||
- ./flux-instance/ks.yaml
|
||||
- ./flux-operator/ks.yaml
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Namespace
|
||||
metadata:
|
||||
name: flux-system
|
||||
annotations:
|
||||
kustomize.toolkit.fluxcd.io/prune: disabled
|
||||
@@ -1,35 +1,13 @@
|
||||
---
|
||||
# yaml-language-server: $schema=https://raw.githubusercontent.com/fluxcd-community/flux2-schemas/main/ocirepository-source-v1.json
|
||||
apiVersion: source.toolkit.fluxcd.io/v1
|
||||
kind: OCIRepository
|
||||
metadata:
|
||||
name: cilium
|
||||
spec:
|
||||
interval: 5m
|
||||
layerSelector:
|
||||
mediaType: application/vnd.cncf.helm.chart.content.v1.tar+gzip
|
||||
operation: copy
|
||||
ref:
|
||||
tag: 1.18.1
|
||||
url: oci://ghcr.io/home-operations/charts-mirror/cilium
|
||||
---
|
||||
# yaml-language-server: $schema=https://raw.githubusercontent.com/fluxcd-community/flux2-schemas/main/helmrelease-helm-v2.json
|
||||
apiVersion: helm.toolkit.fluxcd.io/v2
|
||||
kind: HelmRelease
|
||||
metadata:
|
||||
name: cilium
|
||||
spec:
|
||||
interval: 1h
|
||||
chartRef:
|
||||
kind: OCIRepository
|
||||
name: cilium
|
||||
install:
|
||||
remediation:
|
||||
retries: -1
|
||||
upgrade:
|
||||
cleanupOnFail: true
|
||||
remediation:
|
||||
retries: 3
|
||||
interval: 1h
|
||||
values:
|
||||
autoDirectNodeRoutes: true
|
||||
bpf:
|
||||
@@ -54,12 +32,9 @@ spec:
|
||||
endpointRoutes:
|
||||
enabled: true
|
||||
envoy:
|
||||
rollOutPods: true
|
||||
prometheus:
|
||||
serviceMonitor:
|
||||
enabled: true
|
||||
enabled: false
|
||||
gatewayAPI:
|
||||
enabled: true
|
||||
enabled: false
|
||||
hubble:
|
||||
enabled: false
|
||||
ipam:
|
||||
@@ -74,7 +49,8 @@ spec:
|
||||
loadBalancer:
|
||||
algorithm: maglev
|
||||
mode: "#{ cilium_loadbalancer_mode }#"
|
||||
localRedirectPolicy: true
|
||||
localRedirectPolicies:
|
||||
enabled: true
|
||||
operator:
|
||||
dashboards:
|
||||
enabled: true
|
||||
@@ -112,4 +88,5 @@ spec:
|
||||
- SYS_ADMIN
|
||||
- SYS_RESOURCE
|
||||
socketLB:
|
||||
enabled: true
|
||||
hostNamespaceOnly: true
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
---
|
||||
# yaml-language-server: $schema=https://json.schemastore.org/kustomization
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
resources:
|
||||
- ./helmrelease.yaml
|
||||
- ./ocirepository.yaml
|
||||
- ./networks.yaml
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
---
|
||||
# yaml-language-server: $schema=https://datreeio.github.io/CRDs-catalog/cilium.io/ciliumloadbalancerippool_v2alpha1.json
|
||||
apiVersion: cilium.io/v2alpha1
|
||||
kind: CiliumLoadBalancerIPPool
|
||||
metadata:
|
||||
@@ -9,7 +8,6 @@ spec:
|
||||
blocks:
|
||||
- cidr: "#{ node_cidr }#"
|
||||
---
|
||||
# yaml-language-server: $schema=https://datreeio.github.io/CRDs-catalog/cilium.io/ciliuml2announcementpolicy_v2alpha1.json
|
||||
apiVersion: cilium.io/v2alpha1
|
||||
kind: CiliumL2AnnouncementPolicy
|
||||
metadata:
|
||||
@@ -25,7 +23,6 @@ spec:
|
||||
kubernetes.io/os: linux
|
||||
#% if cilium_bgp_enabled %#
|
||||
---
|
||||
# yaml-language-server: $schema=https://datreeio.github.io/CRDs-catalog/cilium.io/ciliumbgpadvertisement_v2alpha1.json
|
||||
apiVersion: cilium.io/v2alpha1
|
||||
kind: CiliumBGPAdvertisement
|
||||
metadata:
|
||||
@@ -42,7 +39,6 @@ spec:
|
||||
matchExpressions:
|
||||
- { key: somekey, operator: NotIn, values: ["never-used-value"] }
|
||||
---
|
||||
# yaml-language-server: $schema=https://datreeio.github.io/CRDs-catalog/cilium.io/ciliumbgppeerconfig_v2alpha1.json
|
||||
apiVersion: cilium.io/v2alpha1
|
||||
kind: CiliumBGPPeerConfig
|
||||
metadata:
|
||||
@@ -55,7 +51,6 @@ spec:
|
||||
matchLabels:
|
||||
advertise: bgp
|
||||
---
|
||||
# yaml-language-server: $schema=https://datreeio.github.io/CRDs-catalog/cilium.io/ciliumbgpclusterconfig_v2alpha1.json
|
||||
apiVersion: cilium.io/v2alpha1
|
||||
kind: CiliumBGPClusterConfig
|
||||
metadata:
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
---
|
||||
apiVersion: source.toolkit.fluxcd.io/v1
|
||||
kind: OCIRepository
|
||||
metadata:
|
||||
name: cilium
|
||||
spec:
|
||||
interval: 15m
|
||||
layerSelector:
|
||||
mediaType: application/vnd.cncf.helm.chart.content.v1.tar+gzip
|
||||
operation: copy
|
||||
ref:
|
||||
tag: 1.19.1
|
||||
url: oci://quay.io/cilium/charts/cilium
|
||||
@@ -1,35 +0,0 @@
|
||||
---
|
||||
# yaml-language-server: $schema=https://github.com/datreeio/CRDs-catalog/raw/refs/heads/main/gateway.networking.k8s.io/gateway_v1.json
|
||||
apiVersion: gateway.networking.k8s.io/v1
|
||||
kind: Gateway
|
||||
metadata:
|
||||
name: external
|
||||
annotations:
|
||||
external-dns.alpha.kubernetes.io/target: "external.${SECRET_DOMAIN}"
|
||||
spec:
|
||||
gatewayClassName: cilium
|
||||
addresses:
|
||||
- type: IPAddress
|
||||
value: "#{ cloudflare_gateway_addr }#"
|
||||
infrastructure:
|
||||
annotations:
|
||||
external-dns.alpha.kubernetes.io/hostname: "external.${SECRET_DOMAIN}"
|
||||
listeners:
|
||||
- name: http
|
||||
protocol: HTTP
|
||||
port: 80
|
||||
hostname: "*.${SECRET_DOMAIN}"
|
||||
allowedRoutes:
|
||||
namespaces:
|
||||
from: Same
|
||||
- name: https
|
||||
protocol: HTTPS
|
||||
port: 443
|
||||
hostname: "*.${SECRET_DOMAIN}"
|
||||
allowedRoutes:
|
||||
namespaces:
|
||||
from: All
|
||||
tls:
|
||||
certificateRefs:
|
||||
- kind: Secret
|
||||
name: ${SECRET_DOMAIN/./-}-production-tls
|
||||
@@ -1,35 +0,0 @@
|
||||
---
|
||||
# yaml-language-server: $schema=https://github.com/datreeio/CRDs-catalog/raw/refs/heads/main/gateway.networking.k8s.io/gateway_v1.json
|
||||
apiVersion: gateway.networking.k8s.io/v1
|
||||
kind: Gateway
|
||||
metadata:
|
||||
name: internal
|
||||
annotations:
|
||||
external-dns.alpha.kubernetes.io/target: "internal.${SECRET_DOMAIN}"
|
||||
spec:
|
||||
gatewayClassName: cilium
|
||||
addresses:
|
||||
- type: IPAddress
|
||||
value: "#{ cluster_gateway_addr }#"
|
||||
infrastructure:
|
||||
annotations:
|
||||
external-dns.alpha.kubernetes.io/hostname: "internal.${SECRET_DOMAIN}"
|
||||
listeners:
|
||||
- name: http
|
||||
protocol: HTTP
|
||||
port: 80
|
||||
hostname: "*.${SECRET_DOMAIN}"
|
||||
allowedRoutes:
|
||||
namespaces:
|
||||
from: Same
|
||||
- name: https
|
||||
protocol: HTTPS
|
||||
port: 443
|
||||
hostname: "*.${SECRET_DOMAIN}"
|
||||
allowedRoutes:
|
||||
namespaces:
|
||||
from: All
|
||||
tls:
|
||||
certificateRefs:
|
||||
- kind: Secret
|
||||
name: ${SECRET_DOMAIN/./-}-production-tls
|
||||
@@ -1,8 +0,0 @@
|
||||
---
|
||||
# yaml-language-server: $schema=https://json.schemastore.org/kustomization
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
resources:
|
||||
- ./certificate.yaml
|
||||
- ./external.yaml
|
||||
- ./internal.yaml
|
||||
@@ -1,18 +1,9 @@
|
||||
---
|
||||
# yaml-language-server: $schema=https://raw.githubusercontent.com/fluxcd-community/flux2-schemas/main/kustomization-kustomize-v1.json
|
||||
apiVersion: kustomize.toolkit.fluxcd.io/v1
|
||||
kind: Kustomization
|
||||
metadata:
|
||||
name: &app cilium
|
||||
namespace: &namespace kube-system
|
||||
name: cilium
|
||||
spec:
|
||||
commonMetadata:
|
||||
labels:
|
||||
app.kubernetes.io/name: *app
|
||||
decryption:
|
||||
provider: sops
|
||||
secretRef:
|
||||
name: sops-age
|
||||
interval: 1h
|
||||
path: ./kubernetes/apps/kube-system/cilium/app
|
||||
postBuild:
|
||||
@@ -20,43 +11,9 @@ spec:
|
||||
- name: cluster-secrets
|
||||
kind: Secret
|
||||
prune: true
|
||||
retryInterval: 2m
|
||||
sourceRef:
|
||||
kind: GitRepository
|
||||
name: flux-system
|
||||
namespace: flux-system
|
||||
targetNamespace: *namespace
|
||||
timeout: 5m
|
||||
targetNamespace: kube-system
|
||||
wait: false
|
||||
---
|
||||
# yaml-language-server: $schema=https://raw.githubusercontent.com/fluxcd-community/flux2-schemas/main/kustomization-kustomize-v1.json
|
||||
apiVersion: kustomize.toolkit.fluxcd.io/v1
|
||||
kind: Kustomization
|
||||
metadata:
|
||||
name: &app cilium-gateway
|
||||
namespace: &namespace kube-system
|
||||
spec:
|
||||
commonMetadata:
|
||||
labels:
|
||||
app.kubernetes.io/name: *app
|
||||
decryption:
|
||||
provider: sops
|
||||
secretRef:
|
||||
name: sops-age
|
||||
dependsOn:
|
||||
- name: cert-manager
|
||||
namespace: cert-manager
|
||||
interval: 1h
|
||||
path: ./kubernetes/apps/kube-system/cilium/gateway
|
||||
postBuild:
|
||||
substituteFrom:
|
||||
- name: cluster-secrets
|
||||
kind: Secret
|
||||
prune: true
|
||||
sourceRef:
|
||||
kind: GitRepository
|
||||
name: flux-system
|
||||
namespace: flux-system
|
||||
targetNamespace: *namespace
|
||||
timeout: 15m
|
||||
wait: true
|
||||
|
||||
@@ -1,36 +1,13 @@
|
||||
---
|
||||
# yaml-language-server: $schema=https://raw.githubusercontent.com/fluxcd-community/flux2-schemas/main/ocirepository-source-v1.json
|
||||
apiVersion: source.toolkit.fluxcd.io/v1
|
||||
kind: OCIRepository
|
||||
metadata:
|
||||
name: coredns
|
||||
spec:
|
||||
interval: 5m
|
||||
layerSelector:
|
||||
mediaType: application/vnd.cncf.helm.chart.content.v1.tar+gzip
|
||||
operation: copy
|
||||
url: oci://ghcr.io/coredns/charts/coredns
|
||||
ref:
|
||||
tag: 1.43.3
|
||||
---
|
||||
# yaml-language-server: $schema=https://raw.githubusercontent.com/fluxcd-community/flux2-schemas/main/helmrelease-helm-v2.json
|
||||
apiVersion: helm.toolkit.fluxcd.io/v2
|
||||
kind: HelmRelease
|
||||
metadata:
|
||||
name: coredns
|
||||
spec:
|
||||
interval: 1h
|
||||
chartRef:
|
||||
kind: OCIRepository
|
||||
name: coredns
|
||||
install:
|
||||
remediation:
|
||||
retries: -1
|
||||
upgrade:
|
||||
cleanupOnFail: true
|
||||
remediation:
|
||||
strategy: rollback
|
||||
retries: 3
|
||||
interval: 1h
|
||||
values:
|
||||
fullnameOverride: coredns
|
||||
image:
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
# yaml-language-server: $schema=https://json.schemastore.org/kustomization
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
resources:
|
||||
- ./helmrelease.yaml
|
||||
- ./ocirepository.yaml
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
---
|
||||
apiVersion: source.toolkit.fluxcd.io/v1
|
||||
kind: OCIRepository
|
||||
metadata:
|
||||
name: coredns
|
||||
spec:
|
||||
interval: 15m
|
||||
layerSelector:
|
||||
mediaType: application/vnd.cncf.helm.chart.content.v1.tar+gzip
|
||||
operation: copy
|
||||
url: oci://ghcr.io/coredns/charts/coredns
|
||||
ref:
|
||||
tag: 1.45.2
|
||||
@@ -1,18 +1,9 @@
|
||||
---
|
||||
# yaml-language-server: $schema=https://raw.githubusercontent.com/fluxcd-community/flux2-schemas/main/kustomization-kustomize-v1.json
|
||||
apiVersion: kustomize.toolkit.fluxcd.io/v1
|
||||
kind: Kustomization
|
||||
metadata:
|
||||
name: &app coredns
|
||||
namespace: &namespace kube-system
|
||||
name: coredns
|
||||
spec:
|
||||
commonMetadata:
|
||||
labels:
|
||||
app.kubernetes.io/name: *app
|
||||
decryption:
|
||||
provider: sops
|
||||
secretRef:
|
||||
name: sops-age
|
||||
interval: 1h
|
||||
path: ./kubernetes/apps/kube-system/coredns/app
|
||||
postBuild:
|
||||
@@ -20,11 +11,9 @@ spec:
|
||||
- name: cluster-secrets
|
||||
kind: Secret
|
||||
prune: true
|
||||
retryInterval: 2m
|
||||
sourceRef:
|
||||
kind: GitRepository
|
||||
name: flux-system
|
||||
namespace: flux-system
|
||||
targetNamespace: *namespace
|
||||
timeout: 5m
|
||||
targetNamespace: kube-system
|
||||
wait: false
|
||||
|
||||
@@ -1,11 +1,13 @@
|
||||
---
|
||||
# yaml-language-server: $schema=https://json.schemastore.org/kustomization
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
namespace: kube-system
|
||||
|
||||
components:
|
||||
- ../../components/common
|
||||
- ../../components/sops
|
||||
|
||||
resources:
|
||||
- ./namespace.yaml
|
||||
- ./cilium/ks.yaml
|
||||
- ./coredns/ks.yaml
|
||||
- ./metrics-server/ks.yaml
|
||||
|
||||
@@ -1,35 +1,13 @@
|
||||
---
|
||||
# yaml-language-server: $schema=https://raw.githubusercontent.com/fluxcd-community/flux2-schemas/main/ocirepository-source-v1.json
|
||||
apiVersion: source.toolkit.fluxcd.io/v1
|
||||
kind: OCIRepository
|
||||
metadata:
|
||||
name: metrics-server
|
||||
spec:
|
||||
interval: 5m
|
||||
layerSelector:
|
||||
mediaType: application/vnd.cncf.helm.chart.content.v1.tar+gzip
|
||||
operation: copy
|
||||
ref:
|
||||
tag: 3.13.0
|
||||
url: oci://ghcr.io/home-operations/charts-mirror/metrics-server
|
||||
---
|
||||
# yaml-language-server: $schema=https://raw.githubusercontent.com/fluxcd-community/flux2-schemas/main/helmrelease-helm-v2.json
|
||||
apiVersion: helm.toolkit.fluxcd.io/v2
|
||||
kind: HelmRelease
|
||||
metadata:
|
||||
name: metrics-server
|
||||
spec:
|
||||
interval: 1h
|
||||
chartRef:
|
||||
kind: OCIRepository
|
||||
name: metrics-server
|
||||
install:
|
||||
remediation:
|
||||
retries: -1
|
||||
upgrade:
|
||||
cleanupOnFail: true
|
||||
remediation:
|
||||
retries: 3
|
||||
interval: 1h
|
||||
values:
|
||||
args:
|
||||
- --kubelet-insecure-tls
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
# yaml-language-server: $schema=https://json.schemastore.org/kustomization
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
resources:
|
||||
- ./helmrelease.yaml
|
||||
- ./ocirepository.yaml
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
---
|
||||
apiVersion: source.toolkit.fluxcd.io/v1
|
||||
kind: OCIRepository
|
||||
metadata:
|
||||
name: metrics-server
|
||||
spec:
|
||||
interval: 15m
|
||||
layerSelector:
|
||||
mediaType: application/vnd.cncf.helm.chart.content.v1.tar+gzip
|
||||
operation: copy
|
||||
ref:
|
||||
tag: 3.13.0
|
||||
url: oci://ghcr.io/home-operations/charts-mirror/metrics-server
|
||||
@@ -1,18 +1,9 @@
|
||||
---
|
||||
# yaml-language-server: $schema=https://raw.githubusercontent.com/fluxcd-community/flux2-schemas/main/kustomization-kustomize-v1.json
|
||||
apiVersion: kustomize.toolkit.fluxcd.io/v1
|
||||
kind: Kustomization
|
||||
metadata:
|
||||
name: &app metrics-server
|
||||
namespace: &namespace kube-system
|
||||
name: metrics-server
|
||||
spec:
|
||||
commonMetadata:
|
||||
labels:
|
||||
app.kubernetes.io/name: *app
|
||||
decryption:
|
||||
provider: sops
|
||||
secretRef:
|
||||
name: sops-age
|
||||
interval: 1h
|
||||
path: ./kubernetes/apps/kube-system/metrics-server/app
|
||||
postBuild:
|
||||
@@ -20,11 +11,9 @@ spec:
|
||||
- name: cluster-secrets
|
||||
kind: Secret
|
||||
prune: true
|
||||
retryInterval: 2m
|
||||
sourceRef:
|
||||
kind: GitRepository
|
||||
name: flux-system
|
||||
namespace: flux-system
|
||||
targetNamespace: *namespace
|
||||
timeout: 5m
|
||||
targetNamespace: kube-system
|
||||
wait: false
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Namespace
|
||||
metadata:
|
||||
name: kube-system
|
||||
annotations:
|
||||
kustomize.toolkit.fluxcd.io/prune: disabled
|
||||
@@ -1,35 +1,13 @@
|
||||
---
|
||||
# yaml-language-server: $schema=https://raw.githubusercontent.com/fluxcd-community/flux2-schemas/main/ocirepository-source-v1.json
|
||||
apiVersion: source.toolkit.fluxcd.io/v1
|
||||
kind: OCIRepository
|
||||
metadata:
|
||||
name: reloader
|
||||
spec:
|
||||
interval: 5m
|
||||
layerSelector:
|
||||
mediaType: application/vnd.cncf.helm.chart.content.v1.tar+gzip
|
||||
operation: copy
|
||||
ref:
|
||||
tag: 2.2.2
|
||||
url: oci://ghcr.io/stakater/charts/reloader
|
||||
---
|
||||
# yaml-language-server: $schema=https://raw.githubusercontent.com/fluxcd-community/flux2-schemas/main/helmrelease-helm-v2.json
|
||||
apiVersion: helm.toolkit.fluxcd.io/v2
|
||||
kind: HelmRelease
|
||||
metadata:
|
||||
name: reloader
|
||||
spec:
|
||||
interval: 1h
|
||||
chartRef:
|
||||
kind: OCIRepository
|
||||
name: reloader
|
||||
install:
|
||||
remediation:
|
||||
retries: -1
|
||||
upgrade:
|
||||
cleanupOnFail: true
|
||||
remediation:
|
||||
retries: 3
|
||||
interval: 1h
|
||||
values:
|
||||
fullnameOverride: reloader
|
||||
reloader:
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
# yaml-language-server: $schema=https://json.schemastore.org/kustomization
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
resources:
|
||||
- ./helmrelease.yaml
|
||||
- ./ocirepository.yaml
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
---
|
||||
apiVersion: source.toolkit.fluxcd.io/v1
|
||||
kind: OCIRepository
|
||||
metadata:
|
||||
name: reloader
|
||||
spec:
|
||||
interval: 15m
|
||||
layerSelector:
|
||||
mediaType: application/vnd.cncf.helm.chart.content.v1.tar+gzip
|
||||
operation: copy
|
||||
ref:
|
||||
tag: 2.2.8
|
||||
url: oci://ghcr.io/stakater/charts/reloader
|
||||
@@ -1,18 +1,9 @@
|
||||
---
|
||||
# yaml-language-server: $schema=https://raw.githubusercontent.com/fluxcd-community/flux2-schemas/main/kustomization-kustomize-v1.json
|
||||
apiVersion: kustomize.toolkit.fluxcd.io/v1
|
||||
kind: Kustomization
|
||||
metadata:
|
||||
name: &app reloader
|
||||
namespace: &namespace kube-system
|
||||
name: reloader
|
||||
spec:
|
||||
commonMetadata:
|
||||
labels:
|
||||
app.kubernetes.io/name: *app
|
||||
decryption:
|
||||
provider: sops
|
||||
secretRef:
|
||||
name: sops-age
|
||||
interval: 1h
|
||||
path: ./kubernetes/apps/kube-system/reloader/app
|
||||
postBuild:
|
||||
@@ -20,11 +11,9 @@ spec:
|
||||
- name: cluster-secrets
|
||||
kind: Secret
|
||||
prune: true
|
||||
retryInterval: 2m
|
||||
sourceRef:
|
||||
kind: GitRepository
|
||||
name: flux-system
|
||||
namespace: flux-system
|
||||
targetNamespace: *namespace
|
||||
timeout: 5m
|
||||
targetNamespace: kube-system
|
||||
wait: false
|
||||
|
||||
@@ -1,36 +1,14 @@
|
||||
#% if spegel_enabled %#
|
||||
---
|
||||
# yaml-language-server: $schema=https://raw.githubusercontent.com/fluxcd-community/flux2-schemas/main/ocirepository-source-v1.json
|
||||
apiVersion: source.toolkit.fluxcd.io/v1
|
||||
kind: OCIRepository
|
||||
metadata:
|
||||
name: spegel
|
||||
spec:
|
||||
interval: 5m
|
||||
layerSelector:
|
||||
mediaType: application/vnd.cncf.helm.chart.content.v1.tar+gzip
|
||||
operation: copy
|
||||
ref:
|
||||
tag: 0.3.0
|
||||
url: oci://ghcr.io/spegel-org/helm-charts/spegel
|
||||
---
|
||||
# yaml-language-server: $schema=https://raw.githubusercontent.com/fluxcd-community/flux2-schemas/main/helmrelease-helm-v2.json
|
||||
apiVersion: helm.toolkit.fluxcd.io/v2
|
||||
kind: HelmRelease
|
||||
metadata:
|
||||
name: spegel
|
||||
spec:
|
||||
interval: 1h
|
||||
chartRef:
|
||||
kind: OCIRepository
|
||||
name: spegel
|
||||
install:
|
||||
remediation:
|
||||
retries: -1
|
||||
upgrade:
|
||||
cleanupOnFail: true
|
||||
remediation:
|
||||
retries: 3
|
||||
interval: 1h
|
||||
values:
|
||||
spegel:
|
||||
containerdSock: /run/containerd/containerd.sock
|
||||
@@ -40,6 +18,4 @@ spec:
|
||||
hostPort: 29999
|
||||
serviceMonitor:
|
||||
enabled: true
|
||||
grafanaDashboard:
|
||||
enabled: true
|
||||
#% endif %#
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
#% if spegel_enabled %#
|
||||
---
|
||||
# yaml-language-server: $schema=https://json.schemastore.org/kustomization
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
resources:
|
||||
- ./helmrelease.yaml
|
||||
- ./ocirepository.yaml
|
||||
#% endif %#
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
#% if spegel_enabled %#
|
||||
---
|
||||
apiVersion: source.toolkit.fluxcd.io/v1
|
||||
kind: OCIRepository
|
||||
metadata:
|
||||
name: spegel
|
||||
spec:
|
||||
interval: 15m
|
||||
layerSelector:
|
||||
mediaType: application/vnd.cncf.helm.chart.content.v1.tar+gzip
|
||||
operation: copy
|
||||
ref:
|
||||
tag: 0.6.0
|
||||
url: oci://ghcr.io/spegel-org/helm-charts/spegel
|
||||
#% endif %#
|
||||
@@ -1,19 +1,10 @@
|
||||
#% if spegel_enabled %#
|
||||
---
|
||||
# yaml-language-server: $schema=https://raw.githubusercontent.com/fluxcd-community/flux2-schemas/main/kustomization-kustomize-v1.json
|
||||
apiVersion: kustomize.toolkit.fluxcd.io/v1
|
||||
kind: Kustomization
|
||||
metadata:
|
||||
name: &app spegel
|
||||
namespace: &namespace kube-system
|
||||
name: spegel
|
||||
spec:
|
||||
commonMetadata:
|
||||
labels:
|
||||
app.kubernetes.io/name: *app
|
||||
decryption:
|
||||
provider: sops
|
||||
secretRef:
|
||||
name: sops-age
|
||||
interval: 1h
|
||||
path: ./kubernetes/apps/kube-system/spegel/app
|
||||
postBuild:
|
||||
@@ -21,12 +12,10 @@ spec:
|
||||
- name: cluster-secrets
|
||||
kind: Secret
|
||||
prune: true
|
||||
retryInterval: 2m
|
||||
sourceRef:
|
||||
kind: GitRepository
|
||||
name: flux-system
|
||||
namespace: flux-system
|
||||
targetNamespace: *namespace
|
||||
timeout: 5m
|
||||
targetNamespace: kube-system
|
||||
wait: false
|
||||
#% endif %#
|
||||
|
||||
@@ -1,36 +1,13 @@
|
||||
---
|
||||
# yaml-language-server: $schema=https://raw.githubusercontent.com/fluxcd-community/flux2-schemas/main/ocirepository-source-v1.json
|
||||
apiVersion: source.toolkit.fluxcd.io/v1
|
||||
kind: OCIRepository
|
||||
metadata:
|
||||
name: cloudflare-dns
|
||||
spec:
|
||||
interval: 5m
|
||||
layerSelector:
|
||||
mediaType: application/vnd.cncf.helm.chart.content.v1.tar+gzip
|
||||
operation: copy
|
||||
ref:
|
||||
tag: 1.18.0
|
||||
url: oci://ghcr.io/home-operations/charts-mirror/external-dns
|
||||
---
|
||||
# yaml-language-server: $schema=https://raw.githubusercontent.com/fluxcd-community/flux2-schemas/main/helmrelease-helm-v2.json
|
||||
apiVersion: helm.toolkit.fluxcd.io/v2
|
||||
kind: HelmRelease
|
||||
metadata:
|
||||
name: &app cloudflare-dns
|
||||
spec:
|
||||
interval: 1h
|
||||
chartRef:
|
||||
kind: OCIRepository
|
||||
name: cloudflare-dns
|
||||
install:
|
||||
remediation:
|
||||
retries: -1
|
||||
upgrade:
|
||||
cleanupOnFail: true
|
||||
remediation:
|
||||
strategy: rollback
|
||||
retries: 3
|
||||
interval: 1h
|
||||
values:
|
||||
fullnameOverride: *app
|
||||
provider: cloudflare
|
||||
@@ -45,7 +22,7 @@ spec:
|
||||
- --cloudflare-proxied
|
||||
- --crd-source-apiversion=externaldns.k8s.io/v1alpha1
|
||||
- --crd-source-kind=DNSEndpoint
|
||||
- --gateway-name=external
|
||||
- --gateway-name=envoy-external
|
||||
triggerLoopOnEvent: true
|
||||
policy: sync
|
||||
sources: ["crd", "gateway-httproute"]
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
---
|
||||
# yaml-language-server: $schema=https://json.schemastore.org/kustomization
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
resources:
|
||||
- ./secret.sops.yaml
|
||||
- ./helmrelease.yaml
|
||||
- ./ocirepository.yaml
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
---
|
||||
apiVersion: source.toolkit.fluxcd.io/v1
|
||||
kind: OCIRepository
|
||||
metadata:
|
||||
name: cloudflare-dns
|
||||
spec:
|
||||
interval: 15m
|
||||
layerSelector:
|
||||
mediaType: application/vnd.cncf.helm.chart.content.v1.tar+gzip
|
||||
operation: copy
|
||||
ref:
|
||||
tag: 1.20.0
|
||||
url: oci://ghcr.io/home-operations/charts-mirror/external-dns
|
||||
@@ -1,5 +1,4 @@
|
||||
---
|
||||
# yaml-language-server: $schema=https://kubernetesjsonschema.dev/v1.18.1-standalone-strict/secret-v1.json
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
|
||||
@@ -1,30 +1,19 @@
|
||||
---
|
||||
# yaml-language-server: $schema=https://raw.githubusercontent.com/fluxcd-community/flux2-schemas/main/kustomization-kustomize-v1.json
|
||||
apiVersion: kustomize.toolkit.fluxcd.io/v1
|
||||
kind: Kustomization
|
||||
metadata:
|
||||
name: &app cloudflare-dns
|
||||
namespace: &namespace network
|
||||
name: cloudflare-dns
|
||||
spec:
|
||||
commonMetadata:
|
||||
labels:
|
||||
app.kubernetes.io/name: *app
|
||||
decryption:
|
||||
provider: sops
|
||||
secretRef:
|
||||
name: sops-age
|
||||
interval: 1h
|
||||
path: ./kubernetes/apps/network/cloudflare-dns
|
||||
path: ./kubernetes/apps/network/cloudflare-dns/app
|
||||
postBuild:
|
||||
substituteFrom:
|
||||
- name: cluster-secrets
|
||||
kind: Secret
|
||||
prune: true
|
||||
retryInterval: 2m
|
||||
sourceRef:
|
||||
kind: GitRepository
|
||||
name: flux-system
|
||||
namespace: flux-system
|
||||
targetNamespace: *namespace
|
||||
timeout: 5m
|
||||
targetNamespace: network
|
||||
wait: true
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
---
|
||||
# yaml-language-server: $schema=https://raw.githubusercontent.com/datreeio/CRDs-catalog/main/externaldns.k8s.io/dnsendpoint_v1alpha1.json
|
||||
apiVersion: externaldns.k8s.io/v1alpha1
|
||||
kind: DNSEndpoint
|
||||
metadata:
|
||||
|
||||
@@ -1,21 +1,13 @@
|
||||
---
|
||||
# yaml-language-server: $schema=https://raw.githubusercontent.com/fluxcd-community/flux2-schemas/main/helmrelease-helm-v2.json
|
||||
apiVersion: helm.toolkit.fluxcd.io/v2
|
||||
kind: HelmRelease
|
||||
metadata:
|
||||
name: cloudflare-tunnel
|
||||
spec:
|
||||
interval: 1h
|
||||
chartRef:
|
||||
kind: OCIRepository
|
||||
name: app-template
|
||||
install:
|
||||
remediation:
|
||||
retries: -1
|
||||
upgrade:
|
||||
cleanupOnFail: true
|
||||
remediation:
|
||||
retries: 3
|
||||
name: cloudflare-tunnel
|
||||
interval: 1h
|
||||
values:
|
||||
controllers:
|
||||
cloudflare-tunnel:
|
||||
@@ -26,13 +18,12 @@ spec:
|
||||
app:
|
||||
image:
|
||||
repository: docker.io/cloudflare/cloudflared
|
||||
tag: 2025.8.1
|
||||
tag: 2026.2.0
|
||||
env:
|
||||
NO_AUTOUPDATE: true
|
||||
TUNNEL_METRICS: 0.0.0.0:8080
|
||||
TUNNEL_ORIGIN_ENABLE_HTTP2: true
|
||||
TUNNEL_POST_QUANTUM: true
|
||||
TUNNEL_TRANSPORT_PROTOCOL: quic
|
||||
TUNNEL_POST_QUANTUM: true # disable when using http2
|
||||
TUNNEL_TRANSPORT_PROTOCOL: quic # or http2
|
||||
envFrom:
|
||||
- secretRef:
|
||||
name: cloudflare-tunnel-secret
|
||||
@@ -73,11 +64,21 @@ spec:
|
||||
app:
|
||||
endpoints:
|
||||
- port: http
|
||||
configMaps:
|
||||
config:
|
||||
data:
|
||||
config.yaml: |-
|
||||
ingress:
|
||||
- hostname: "*.${SECRET_DOMAIN}"
|
||||
originRequest:
|
||||
http2Origin: true
|
||||
originServerName: external.${SECRET_DOMAIN}
|
||||
service: https://envoy-external.{{ .Release.Namespace }}.svc.cluster.local:443
|
||||
- service: http_status:404
|
||||
persistence:
|
||||
config-file:
|
||||
type: configMap
|
||||
name: cloudflare-tunnel-configmap
|
||||
identifier: config
|
||||
globalMounts:
|
||||
- path: /etc/cloudflared/config.yaml
|
||||
subPath: config.yaml
|
||||
readOnly: true
|
||||
|
||||
@@ -1,14 +1,8 @@
|
||||
---
|
||||
# yaml-language-server: $schema=https://json.schemastore.org/kustomization
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
resources:
|
||||
- ./dnsendpoint.yaml
|
||||
- ./secret.sops.yaml
|
||||
- ./helmrelease.yaml
|
||||
configMapGenerator:
|
||||
- name: cloudflare-tunnel-configmap
|
||||
files:
|
||||
- config.yaml=./resources/config.yaml
|
||||
generatorOptions:
|
||||
disableNameSuffixHash: true
|
||||
- ./ocirepository.yaml
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
---
|
||||
apiVersion: source.toolkit.fluxcd.io/v1
|
||||
kind: OCIRepository
|
||||
metadata:
|
||||
name: cloudflare-tunnel
|
||||
spec:
|
||||
interval: 15m
|
||||
layerSelector:
|
||||
mediaType: application/vnd.cncf.helm.chart.content.v1.tar+gzip
|
||||
operation: copy
|
||||
ref:
|
||||
tag: 4.6.2
|
||||
url: oci://ghcr.io/bjw-s-labs/helm/app-template
|
||||
@@ -1,10 +0,0 @@
|
||||
---
|
||||
originRequest:
|
||||
originServerName: "external.${SECRET_DOMAIN}"
|
||||
|
||||
ingress:
|
||||
- hostname: "${SECRET_DOMAIN}"
|
||||
service: &svc https://cilium-gateway-external.kube-system.svc.cluster.local
|
||||
- hostname: "*.${SECRET_DOMAIN}"
|
||||
service: *svc
|
||||
- service: http_status:404
|
||||
@@ -1,5 +1,4 @@
|
||||
---
|
||||
# yaml-language-server: $schema=https://kubernetesjsonschema.dev/v1.18.1-standalone-strict/secret-v1.json
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
|
||||
@@ -1,30 +1,19 @@
|
||||
---
|
||||
# yaml-language-server: $schema=https://raw.githubusercontent.com/fluxcd-community/flux2-schemas/main/kustomization-kustomize-v1.json
|
||||
apiVersion: kustomize.toolkit.fluxcd.io/v1
|
||||
kind: Kustomization
|
||||
metadata:
|
||||
name: &app cloudflare-tunnel
|
||||
namespace: &namespace network
|
||||
name: cloudflare-tunnel
|
||||
spec:
|
||||
commonMetadata:
|
||||
labels:
|
||||
app.kubernetes.io/name: *app
|
||||
decryption:
|
||||
provider: sops
|
||||
secretRef:
|
||||
name: sops-age
|
||||
interval: 1h
|
||||
path: ./kubernetes/apps/network/cloudflare-tunnel
|
||||
path: ./kubernetes/apps/network/cloudflare-tunnel/app
|
||||
postBuild:
|
||||
substituteFrom:
|
||||
- name: cluster-secrets
|
||||
kind: Secret
|
||||
prune: true
|
||||
retryInterval: 2m
|
||||
sourceRef:
|
||||
kind: GitRepository
|
||||
name: flux-system
|
||||
namespace: flux-system
|
||||
targetNamespace: *namespace
|
||||
timeout: 5m
|
||||
targetNamespace: network
|
||||
wait: false
|
||||
|
||||
@@ -1,13 +1,18 @@
|
||||
---
|
||||
# yaml-language-server: $schema=https://raw.githubusercontent.com/datreeio/CRDs-catalog/main/cert-manager.io/certificate_v1.json
|
||||
apiVersion: cert-manager.io/v1
|
||||
kind: Certificate
|
||||
metadata:
|
||||
name: "${SECRET_DOMAIN/./-}-production"
|
||||
spec:
|
||||
secretName: "${SECRET_DOMAIN/./-}-production-tls"
|
||||
dnsNames:
|
||||
- "${SECRET_DOMAIN}"
|
||||
- "*.${SECRET_DOMAIN}"
|
||||
duration: 160h
|
||||
issuerRef:
|
||||
name: letsencrypt-production
|
||||
kind: ClusterIssuer
|
||||
commonName: "${SECRET_DOMAIN}"
|
||||
dnsNames: ["${SECRET_DOMAIN}", "*.${SECRET_DOMAIN}"]
|
||||
privateKey:
|
||||
algorithm: ECDSA
|
||||
secretName: "${SECRET_DOMAIN/./-}-production-tls"
|
||||
usages:
|
||||
- digital signature
|
||||
@@ -0,0 +1,170 @@
|
||||
---
|
||||
apiVersion: gateway.envoyproxy.io/v1alpha1
|
||||
kind: EnvoyProxy
|
||||
metadata:
|
||||
name: envoy
|
||||
spec:
|
||||
logging:
|
||||
level:
|
||||
default: info
|
||||
provider:
|
||||
type: Kubernetes
|
||||
kubernetes:
|
||||
envoyDeployment:
|
||||
replicas: 2
|
||||
container:
|
||||
imageRepository: mirror.gcr.io/envoyproxy/envoy
|
||||
resources:
|
||||
requests:
|
||||
cpu: 100m
|
||||
limits:
|
||||
memory: 1Gi
|
||||
envoyService:
|
||||
externalTrafficPolicy: Cluster
|
||||
shutdown:
|
||||
drainTimeout: 180s
|
||||
telemetry:
|
||||
metrics:
|
||||
prometheus:
|
||||
compression:
|
||||
type: Zstd
|
||||
---
|
||||
apiVersion: gateway.networking.k8s.io/v1
|
||||
kind: GatewayClass
|
||||
metadata:
|
||||
name: envoy
|
||||
spec:
|
||||
controllerName: gateway.envoyproxy.io/gatewayclass-controller
|
||||
parametersRef:
|
||||
group: gateway.envoyproxy.io
|
||||
kind: EnvoyProxy
|
||||
name: envoy
|
||||
namespace: network
|
||||
---
|
||||
apiVersion: gateway.networking.k8s.io/v1
|
||||
kind: Gateway
|
||||
metadata:
|
||||
name: envoy-external
|
||||
annotations:
|
||||
external-dns.alpha.kubernetes.io/target: external.${SECRET_DOMAIN}
|
||||
spec:
|
||||
gatewayClassName: envoy
|
||||
infrastructure:
|
||||
annotations:
|
||||
external-dns.alpha.kubernetes.io/hostname: external.${SECRET_DOMAIN}
|
||||
lbipam.cilium.io/ips: "#{ cloudflare_gateway_addr }#"
|
||||
listeners:
|
||||
- name: http
|
||||
protocol: HTTP
|
||||
port: 80
|
||||
allowedRoutes:
|
||||
namespaces:
|
||||
from: Same
|
||||
- name: https
|
||||
protocol: HTTPS
|
||||
port: 443
|
||||
allowedRoutes:
|
||||
namespaces:
|
||||
from: All
|
||||
tls:
|
||||
certificateRefs:
|
||||
- kind: Secret
|
||||
name: ${SECRET_DOMAIN/./-}-production-tls
|
||||
---
|
||||
apiVersion: gateway.networking.k8s.io/v1
|
||||
kind: Gateway
|
||||
metadata:
|
||||
name: envoy-internal
|
||||
annotations:
|
||||
external-dns.alpha.kubernetes.io/target: internal.${SECRET_DOMAIN}
|
||||
spec:
|
||||
gatewayClassName: envoy
|
||||
infrastructure:
|
||||
annotations:
|
||||
external-dns.alpha.kubernetes.io/hostname: internal.${SECRET_DOMAIN}
|
||||
lbipam.cilium.io/ips: "#{ cluster_gateway_addr }#"
|
||||
listeners:
|
||||
- name: http
|
||||
protocol: HTTP
|
||||
port: 80
|
||||
allowedRoutes:
|
||||
namespaces:
|
||||
from: Same
|
||||
- name: https
|
||||
protocol: HTTPS
|
||||
port: 443
|
||||
allowedRoutes:
|
||||
namespaces:
|
||||
from: All
|
||||
tls:
|
||||
certificateRefs:
|
||||
- kind: Secret
|
||||
name: ${SECRET_DOMAIN/./-}-production-tls
|
||||
---
|
||||
apiVersion: gateway.envoyproxy.io/v1alpha1
|
||||
kind: BackendTrafficPolicy
|
||||
metadata:
|
||||
name: envoy
|
||||
spec:
|
||||
compressor:
|
||||
- type: Zstd
|
||||
zstd: {}
|
||||
- type: Brotli
|
||||
brotli: {}
|
||||
- type: Gzip
|
||||
gzip: {}
|
||||
retry:
|
||||
numRetries: 2
|
||||
retryOn:
|
||||
triggers:
|
||||
- reset
|
||||
targetSelectors:
|
||||
- group: gateway.networking.k8s.io
|
||||
kind: Gateway
|
||||
tcpKeepalive: {}
|
||||
timeout:
|
||||
http:
|
||||
requestTimeout: 0s
|
||||
---
|
||||
apiVersion: gateway.envoyproxy.io/v1alpha1
|
||||
kind: ClientTrafficPolicy
|
||||
metadata:
|
||||
name: envoy
|
||||
spec:
|
||||
clientIPDetection:
|
||||
xForwardedFor:
|
||||
trustedCIDRs:
|
||||
- "#{ cluster_pod_cidr }#"
|
||||
http2:
|
||||
onInvalidMessage: TerminateStream
|
||||
http3: {}
|
||||
targetSelectors:
|
||||
- group: gateway.networking.k8s.io
|
||||
kind: Gateway
|
||||
tcpKeepalive: {}
|
||||
tls:
|
||||
minVersion: "1.2"
|
||||
alpnProtocols:
|
||||
- h2
|
||||
- http/1.1
|
||||
---
|
||||
apiVersion: gateway.networking.k8s.io/v1
|
||||
kind: HTTPRoute
|
||||
metadata:
|
||||
name: https-redirect
|
||||
annotations:
|
||||
external-dns.alpha.kubernetes.io/controller: none
|
||||
spec:
|
||||
parentRefs:
|
||||
- name: envoy-external
|
||||
namespace: network
|
||||
sectionName: http
|
||||
- name: envoy-internal
|
||||
namespace: network
|
||||
sectionName: http
|
||||
rules:
|
||||
- filters:
|
||||
- type: RequestRedirect
|
||||
requestRedirect:
|
||||
scheme: https
|
||||
statusCode: 301
|
||||
@@ -0,0 +1,20 @@
|
||||
---
|
||||
apiVersion: helm.toolkit.fluxcd.io/v2
|
||||
kind: HelmRelease
|
||||
metadata:
|
||||
name: envoy-gateway
|
||||
spec:
|
||||
chartRef:
|
||||
kind: OCIRepository
|
||||
name: envoy-gateway
|
||||
interval: 1h
|
||||
values:
|
||||
global:
|
||||
imageRegistry: mirror.gcr.io
|
||||
config:
|
||||
envoyGateway:
|
||||
provider:
|
||||
type: Kubernetes
|
||||
kubernetes:
|
||||
deploy:
|
||||
type: GatewayNamespace
|
||||
@@ -1,6 +1,9 @@
|
||||
---
|
||||
# yaml-language-server: $schema=https://json.schemastore.org/kustomization
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
resources:
|
||||
- ./certificate.yaml
|
||||
- ./envoy.yaml
|
||||
- ./helmrelease.yaml
|
||||
- ./ocirepository.yaml
|
||||
- ./podmonitor.yaml
|
||||
@@ -0,0 +1,13 @@
|
||||
---
|
||||
apiVersion: source.toolkit.fluxcd.io/v1
|
||||
kind: OCIRepository
|
||||
metadata:
|
||||
name: envoy-gateway
|
||||
spec:
|
||||
interval: 15m
|
||||
layerSelector:
|
||||
mediaType: application/vnd.cncf.helm.chart.content.v1.tar+gzip
|
||||
operation: copy
|
||||
ref:
|
||||
tag: v1.7.0
|
||||
url: oci://mirror.gcr.io/envoyproxy/gateway-helm
|
||||
@@ -0,0 +1,18 @@
|
||||
---
|
||||
apiVersion: monitoring.coreos.com/v1
|
||||
kind: PodMonitor
|
||||
metadata:
|
||||
name: envoy-proxy
|
||||
spec:
|
||||
jobLabel: envoy-proxy
|
||||
namespaceSelector:
|
||||
matchNames:
|
||||
- network
|
||||
podMetricsEndpoints:
|
||||
- port: metrics
|
||||
path: /stats/prometheus
|
||||
honorLabels: true
|
||||
selector:
|
||||
matchLabels:
|
||||
app.kubernetes.io/component: proxy
|
||||
app.kubernetes.io/name: envoy
|
||||
@@ -0,0 +1,19 @@
|
||||
---
|
||||
apiVersion: kustomize.toolkit.fluxcd.io/v1
|
||||
kind: Kustomization
|
||||
metadata:
|
||||
name: envoy-gateway
|
||||
spec:
|
||||
interval: 1h
|
||||
path: ./kubernetes/apps/network/envoy-gateway/app
|
||||
postBuild:
|
||||
substituteFrom:
|
||||
- name: cluster-secrets
|
||||
kind: Secret
|
||||
prune: true
|
||||
sourceRef:
|
||||
kind: GitRepository
|
||||
name: flux-system
|
||||
namespace: flux-system
|
||||
targetNamespace: network
|
||||
wait: false
|
||||
@@ -1,35 +1,13 @@
|
||||
---
|
||||
# yaml-language-server: $schema=https://raw.githubusercontent.com/fluxcd-community/flux2-schemas/main/ocirepository-source-v1.json
|
||||
apiVersion: source.toolkit.fluxcd.io/v1
|
||||
kind: OCIRepository
|
||||
metadata:
|
||||
name: k8s-gateway
|
||||
spec:
|
||||
interval: 1h
|
||||
layerSelector:
|
||||
mediaType: application/vnd.cncf.helm.chart.content.v1.tar+gzip
|
||||
operation: copy
|
||||
ref:
|
||||
tag: 3.2.7
|
||||
url: oci://ghcr.io/k8s-gateway/charts/k8s-gateway
|
||||
---
|
||||
# yaml-language-server: $schema=https://raw.githubusercontent.com/fluxcd-community/flux2-schemas/main/helmrelease-helm-v2.json
|
||||
apiVersion: helm.toolkit.fluxcd.io/v2
|
||||
kind: HelmRelease
|
||||
metadata:
|
||||
name: k8s-gateway
|
||||
spec:
|
||||
interval: 1h
|
||||
chartRef:
|
||||
kind: OCIRepository
|
||||
name: k8s-gateway
|
||||
install:
|
||||
remediation:
|
||||
retries: -1
|
||||
upgrade:
|
||||
cleanupOnFail: true
|
||||
remediation:
|
||||
retries: 3
|
||||
interval: 1h
|
||||
values:
|
||||
fullnameOverride: k8s-gateway
|
||||
domain: "${SECRET_DOMAIN}"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
# yaml-language-server: $schema=https://json.schemastore.org/kustomization
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
resources:
|
||||
- ./helmrelease.yaml
|
||||
- ./ocirepository.yaml
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
---
|
||||
apiVersion: source.toolkit.fluxcd.io/v1
|
||||
kind: OCIRepository
|
||||
metadata:
|
||||
name: k8s-gateway
|
||||
spec:
|
||||
interval: 1h
|
||||
layerSelector:
|
||||
mediaType: application/vnd.cncf.helm.chart.content.v1.tar+gzip
|
||||
operation: copy
|
||||
ref:
|
||||
tag: 3.4.1
|
||||
url: oci://ghcr.io/k8s-gateway/charts/k8s-gateway
|
||||
@@ -1,30 +1,19 @@
|
||||
---
|
||||
# yaml-language-server: $schema=https://raw.githubusercontent.com/fluxcd-community/flux2-schemas/main/kustomization-kustomize-v1.json
|
||||
apiVersion: kustomize.toolkit.fluxcd.io/v1
|
||||
kind: Kustomization
|
||||
metadata:
|
||||
name: &app k8s-gateway
|
||||
namespace: &namespace network
|
||||
name: k8s-gateway
|
||||
spec:
|
||||
commonMetadata:
|
||||
labels:
|
||||
app.kubernetes.io/name: *app
|
||||
decryption:
|
||||
provider: sops
|
||||
secretRef:
|
||||
name: sops-age
|
||||
interval: 1h
|
||||
path: ./kubernetes/apps/network/k8s-gateway
|
||||
path: ./kubernetes/apps/network/k8s-gateway/app
|
||||
postBuild:
|
||||
substituteFrom:
|
||||
- name: cluster-secrets
|
||||
kind: Secret
|
||||
prune: true
|
||||
retryInterval: 2m
|
||||
sourceRef:
|
||||
kind: GitRepository
|
||||
name: flux-system
|
||||
namespace: flux-system
|
||||
targetNamespace: *namespace
|
||||
timeout: 5m
|
||||
targetNamespace: network
|
||||
wait: false
|
||||
|
||||
@@ -1,11 +1,14 @@
|
||||
---
|
||||
# yaml-language-server: $schema=https://json.schemastore.org/kustomization
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
namespace: network
|
||||
|
||||
components:
|
||||
- ../../components/common
|
||||
- ../../components/sops
|
||||
|
||||
resources:
|
||||
- ./namespace.yaml
|
||||
- ./cloudflare-dns/ks.yaml
|
||||
- ./cloudflare-tunnel/ks.yaml
|
||||
- ./envoy-gateway/ks.yaml
|
||||
- ./k8s-gateway/ks.yaml
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user