Compare commits
489 Commits
fresh-star
...
6730ec8374
| Author | SHA1 | Date | |
|---|---|---|---|
| 6730ec8374 | |||
| 1e5c0be846 | |||
| 2d1001f0f2 | |||
| 6cf71312f6 | |||
| d581e5462d | |||
| 48da9d8081 | |||
| 0c619a4005 | |||
| a45dcee95d | |||
| 3e39b9d7a3 | |||
| 7b5f097b2d | |||
| 91b7a69e31 | |||
| 42dfa2850d | |||
| 9cfb599c7d | |||
| 8bcc3dd49c | |||
| 311f0362a8 | |||
| 46c752773f | |||
| 5462718dfb | |||
| c1b1fb7315 | |||
| 95012b1fc1 | |||
| ec054e476d | |||
| 50d20b7aa2 | |||
| 77d1a4bb34 | |||
| eb33cad5c6 | |||
| 295d4fcde6 | |||
| 6b012e01a8 | |||
| 77097bf81d | |||
| 78fbe875c9 | |||
| 82029fa745 | |||
| d6204b49c8 | |||
| f394b06006 | |||
| be8e6d8990 | |||
| 5dc9432cfa | |||
| 2df8303905 | |||
| 65c11ab4ca | |||
| 55da75f06e | |||
| ac0165cf01 | |||
| 15989f4891 | |||
| 1b11201ad0 | |||
| a3ebc531fe | |||
| 63f154293d | |||
| 42aa0a7263 | |||
| a9b8b45328 | |||
| 3dc481bc8b | |||
| 711c437c0a | |||
| 975f1db8f5 | |||
| ab9ddd0f3b | |||
| 3e59786c83 | |||
| d2a55e9c81 | |||
| 2d743e0de0 | |||
| 0a1c0a65e1 | |||
| 96a09ae6f9 | |||
| 62dc41f74f | |||
| da76710add | |||
| 75b9a019de | |||
| d466387d02 | |||
| 5c4535beb6 | |||
| cd513489a2 | |||
| 44aa0c8136 | |||
| 902004f2e7 | |||
| bf1f1c0b41 | |||
| 5915b8dd30 | |||
| 1adabe92a3 | |||
| 08473fdeae | |||
| c14257842a | |||
| d053342234 | |||
| 2dbd964c28 | |||
| 7712aac0f5 | |||
| c7bc79f574 | |||
| 6cba277b9d | |||
| 1ca79d5262 | |||
| 95ca2aa54f | |||
| bfb089aeff | |||
| ed83a66a83 | |||
| 0d6c67fc27 | |||
| fa7b35326c | |||
| 58a11356f4 | |||
| 0bdef9f86e | |||
| 61c0f8f0b7 | |||
| b4ba66dc18 | |||
| 74b2436694 | |||
| 719a87a6f5 | |||
| fe4e546d47 | |||
| 85e83224dc | |||
| 889ba49e6a | |||
| 0590c97717 | |||
| 3c1b2da775 | |||
| 2675b2f8eb | |||
| 72d8d41e16 | |||
| 31c809f3dd | |||
| f0c549a39e | |||
| b66b08f151 | |||
| 98e3050afa | |||
| fef37fca68 | |||
| 6fa292629c | |||
| 95b52f3bf3 | |||
| d9a646b7fd | |||
| 7ac0029ced | |||
| 2c11e4cec0 | |||
| 40613ce587 | |||
| b95c9e7c69 | |||
| 05c28d0d46 | |||
| 09aeee2bd9 | |||
| d709989558 | |||
| 93d1e579d3 | |||
| 92bcd0ac34 | |||
| c1d08326f3 | |||
| f9015ad561 | |||
| 14d79a2cd0 | |||
| da13987ce8 | |||
| 36aab3d935 | |||
| f50e8c10f7 | |||
| 3b3642faeb | |||
| 8a009bc117 | |||
| 868f96e390 | |||
| 638fc960af | |||
| 1f77bd5176 | |||
| ffd350afd0 | |||
| 093208c3e4 | |||
| db07a48639 | |||
| f061fd0c81 | |||
| 68c54e44fa | |||
| 3120e9ba60 | |||
| e676b6524d | |||
| 5748f69dac | |||
| 31d0559c57 | |||
| 4b2d3faf2e | |||
| 31083e52bc | |||
| b1f3337c98 | |||
| e610e96d80 | |||
| c9997fb8a7 | |||
| b9cc44d7e8 | |||
| be884d07c6 | |||
| 2875d84f33 | |||
| 573601a7ec | |||
| fb60744c5a | |||
| 52ca68c4ce | |||
| 0934a1130a | |||
| 3d28650c1b | |||
| 15063c9885 | |||
| ba3cb2571c | |||
| 5edaeb123c | |||
| 0dc37f69cb | |||
| 777239ccb5 | |||
| 352af6f386 | |||
| 230197e3c6 | |||
| 0c5e22f538 | |||
| e79386b4a5 | |||
| 8f4932132a | |||
| bb6272b16e | |||
| 3a71410c19 | |||
| e5af5c3945 | |||
| 6de56bfd10 | |||
| d70a704f89 | |||
| 5df94c4656 | |||
| a6772893d0 | |||
| ba31945337 | |||
| fcaa28c95a | |||
| a40f9a046a | |||
| 80ed3358e8 | |||
| eae4ff426c | |||
| 0fadd95386 | |||
| 29e06c60eb | |||
| 27ae162886 | |||
| d96344b310 | |||
| e3483fcfe3 | |||
| 784b335f65 | |||
| 9300e327df | |||
| 90fb555dc2 | |||
| 78b3b6b400 | |||
| 90897daa27 | |||
| 0368252850 | |||
| 1503c57fbe | |||
| 0f12840b35 | |||
| 87a071925c | |||
| b6efe42dc2 | |||
| d2cfd7b73d | |||
| bf1cae3fc7 | |||
| 6712e94237 | |||
| 6f8e10f3fc | |||
| 3c04fd6b10 | |||
| ef353d635a | |||
| 0097d057d5 | |||
| b454fc606f | |||
| 7feb19b7fc | |||
| b21f8e402b | |||
| 68f51b26b0 | |||
| 1095d7ef4d | |||
| 8d83c6dc83 | |||
| 65e75a4d39 | |||
| 6c7457d095 | |||
| 9b556e98a9 | |||
| 202ebc7b86 | |||
| ec61023f74 | |||
| 05d3493bb7 | |||
| 2a9f8c3092 | |||
| 226ee59fa6 | |||
| c8f34c45ac | |||
| c0fa400159 | |||
| 6ccb00e86e | |||
| 7b8fb8d8bb | |||
| 0ae3181267 | |||
| c0d83249b9 | |||
| 974d70a39e | |||
| 4518fc674a | |||
| c3912af26b | |||
| 797b97496e | |||
| 29457af188 | |||
| 2a8e56824e | |||
| f71794de4d | |||
| f4a865ce7a | |||
| e7b3b220aa | |||
| 0642d29ed5 | |||
| 3f044670e0 | |||
| 122770b128 | |||
| d894d42129 | |||
| 3426b1215d | |||
| 73a189f4e8 | |||
| 4518cdda22 | |||
| 3682e4d5bf | |||
| 3135514f6d | |||
| 5e39cc9082 | |||
| 6eed078d30 | |||
| 0bb805eaaa | |||
| c0f9670837 | |||
| 69728501e1 | |||
| 0a516b3798 | |||
| c9bb63b373 | |||
| 5b5043755d | |||
| e0fcaeaad4 | |||
| 102efd1254 | |||
| 5400c69771 | |||
| b6c70c9931 | |||
| 2710996a19 | |||
| 32f8ccfeb8 | |||
| 12aab2bf0e | |||
| 957b6dab43 | |||
| d1b30c7e61 | |||
| d880c342a5 | |||
| ae38951164 | |||
| 1e363acfca | |||
| c78ca0933c | |||
| 9a31c6bf15 | |||
| 45aa92fe10 | |||
| 708ffe203c | |||
| e2c75d2f22 | |||
| 3ceec2f10c | |||
| 95cfbfbe66 | |||
| bf9aefb44a | |||
| 5ffb171821 | |||
| a35116aa31 | |||
| b32337a2ba | |||
| d27b43715c | |||
| 4b0ce7a2e3 | |||
| 7f2ef7270c | |||
| 73a9b275a7 | |||
| 8a61a936c6 | |||
| 1c2f77927f | |||
| 4f5b25d910 | |||
| 7c5fafd54e | |||
| de11ec0d1b | |||
| 07c32643e7 | |||
| 9c61d47fda | |||
| 0f24f1dd7b | |||
| 83e5cada3f | |||
| ccf6302924 | |||
| 5eb0362788 | |||
| 0985832c2d | |||
| db86abff25 | |||
| a1b40a6a21 | |||
| 444c4faf96 | |||
| 9f304af879 | |||
| c0524510b8 | |||
| a26a351396 | |||
| 9269f21692 | |||
| 9d6a9ff304 | |||
| 3cd094007e | |||
| 94a57daaf8 | |||
| 6fec8d29a6 | |||
| 3a94da6021 | |||
| 70511ff9bc | |||
| e8b37d90d8 | |||
| 30b7a78360 | |||
| 2561b354d1 | |||
| 949d8b11db | |||
| 6c46b20dba | |||
| f0f9cb4d34 | |||
| 8386e21722 | |||
| c871dae045 | |||
| 70e4967497 | |||
| 8e68c45573 | |||
| c4628523bc | |||
| 071e87ee44 | |||
| 9e17aadb56 | |||
| 3ca4ddc233 | |||
| 215a2ac1fb | |||
| 5b8a861daa | |||
| 319e3bafbe | |||
| ad1c60a049 | |||
| 41020f8c79 | |||
| 60c7dd4bdc | |||
| 0fde3108d6 | |||
| a299c2cc2b | |||
| a4ea45a39c | |||
| 30bae60308 | |||
| 2f3b7af0da | |||
| 30efd5ae6e | |||
| 0e1279473f | |||
| 718a0d7e33 | |||
| 9765f1cf86 | |||
| 5f3a00b382 | |||
| b379c181f2 | |||
| e1801347f2 | |||
| d53db88fd2 | |||
| 5fb2bcfc7e | |||
| f5da3b52a2 | |||
| c3dbb0a608 | |||
| a520c62277 | |||
| 6cf45eda17 | |||
| 753d43b643 | |||
| 263b60018d | |||
| 0816b6e434 | |||
| 18eb912f03 | |||
| a2c23c5f97 | |||
| 15ce411c3e | |||
| 04a8c98d63 | |||
| f46219f87e | |||
| 53154eeed7 | |||
| 2ad310c550 | |||
| d32d94eb00 | |||
| 5b62f7e386 | |||
| 52124193e2 | |||
| 0f8ee9e53d | |||
| 122c70d0a8 | |||
| 5463d76771 | |||
| 60f2056806 | |||
| 6119ac7271 | |||
| 1a01f82e30 | |||
| 74c9ddad62 | |||
| caf62609d3 | |||
| d5622416de | |||
| 4183831d2f | |||
| ae6ed770a9 | |||
| 59d936d467 | |||
| 9b56ce5e4f | |||
| 2424ad440b | |||
| dff138ba31 | |||
| d95eb6f4ab | |||
| 5252f209f5 | |||
| e7348b2718 | |||
| c7cd2c5355 | |||
| 71e75afadb | |||
| 23169aa2ca | |||
| d8aa0a6a32 | |||
| a6630c0376 | |||
| 9056839784 | |||
| 1f8afa2f8e | |||
| e7b22509cd | |||
| e39574b60e | |||
| 197ceb6688 | |||
| 3e95a5edd1 | |||
| 10fe51f52d | |||
| e197cf5e5e | |||
| c54109dbf3 | |||
| 5a97e4b1d8 | |||
| 12cdfd96e2 | |||
| 7d2056b3ee | |||
| 35e579fc01 | |||
| 302613b76a | |||
| 89542df777 | |||
| 233466e2cd | |||
| 461f0589b3 | |||
| 5c16cd3a4b | |||
| 5cd5263d19 | |||
| a886e7c79c | |||
| dd676716f9 | |||
| 110ffa9c22 | |||
| 6ed7d61e21 | |||
| 051083cd6e | |||
| 87f2446cd1 | |||
| faa55fa069 | |||
| af29de91d6 | |||
| 5f3a775201 | |||
| 81f750e5e5 | |||
| 641e50b5e9 | |||
| 3fe8626391 | |||
| 94f851c607 | |||
| d2134ad554 | |||
| 22910085b7 | |||
| 6a4dee0852 | |||
| 49d5803b4f | |||
| b5c51f6720 | |||
| 3a8dbc6e0c | |||
| ead8be8bcb | |||
| f027dad029 | |||
| e35b8ccac8 | |||
| f69128b245 | |||
| d14b62f384 | |||
| ab7b8a6f26 | |||
| 8acc480b05 | |||
| 65834037ee | |||
| 1bf63168f2 | |||
| b3db332075 | |||
| b84c792992 | |||
| 947f154a81 | |||
| 1a88b1c602 | |||
| 55fce1fc36 | |||
| bb4afc0c07 | |||
| eb92a85cac | |||
| 8f70ae5f2e | |||
| f89a2fd1cc | |||
| b493ee9d77 | |||
| 8de0663571 | |||
| 3fc534f44b | |||
| 1c8ccd0fc4 | |||
| 847fd3557b | |||
| d2c2f5038f | |||
| afb9dcec65 | |||
| ba51980cec | |||
| e0eb26b63d | |||
| eda5ba08a0 | |||
| 318aedf89d | |||
| 7b9090afc1 | |||
| a109290c18 | |||
| f4b9742ab1 | |||
| b103358816 | |||
| 46cacb339d | |||
| 1e7dd52721 | |||
| 044cc37392 | |||
| 68ba891abc | |||
| 81ed455ff8 | |||
| b7c2da4419 | |||
| 4bc01e2e78 | |||
| 94d51de471 | |||
| dc0104c55d | |||
| 83be6619e8 | |||
| 48ccacefdd | |||
| cfeef90515 | |||
| ce0bef4970 | |||
| bd5fd97ed0 | |||
| 52641779bc | |||
| e98e02705d | |||
| 3c849f52f7 | |||
| 36187fff41 | |||
| 1ac7504585 | |||
| 879c013e89 | |||
| aa7fe8d3cf | |||
| fd280f1fca | |||
| 2ad381e35c | |||
| e63a285dc3 | |||
| 5336df3134 | |||
| 966639e3c8 | |||
| 97924a8064 | |||
| 37b78f079e | |||
| 0d17825eab | |||
| ffeecf65f6 | |||
| fea49ae167 | |||
| 6b6e7937c1 | |||
| 487baa2813 | |||
| fe2f79d13c | |||
| c3a747c03c | |||
| f1f6ffb9a0 | |||
| e851f6ab8c | |||
| 2ecd20c9d7 | |||
| bdb3bd3234 | |||
| 47e957e444 | |||
| b2dfb2dc0b | |||
| 6ccc964c87 | |||
| 5c7b258ccf | |||
| 351426f055 | |||
| ca598f9750 | |||
| 0cb93ce8a1 | |||
| 6fde991ba9 | |||
| 5f3840cc02 | |||
| d9a22723ef | |||
| f97a655ad5 | |||
| c2aacd0ef4 | |||
| f36ce88026 | |||
| d19d332b59 | |||
| 5cf9de7997 | |||
| 3c84632a2d | |||
| 14bcc8546c | |||
| ca8a63fdbe | |||
| 3a46d17f02 | |||
| add851ee9e | |||
| edbfd26bde | |||
| dea0dfb7cc | |||
| 874fc826cd | |||
| 33cb5c72c7 | |||
| 31df54fcf0 |
1
.gitignore
vendored
1
.gitignore
vendored
@@ -10,4 +10,3 @@ devenv.local.yaml
|
|||||||
|
|
||||||
# pre-commit
|
# pre-commit
|
||||||
.pre-commit-config.yaml
|
.pre-commit-config.yaml
|
||||||
.opencode
|
|
||||||
|
|||||||
3
.vscode/extensions.json
vendored
3
.vscode/extensions.json
vendored
@@ -2,7 +2,6 @@
|
|||||||
"recommendations": [
|
"recommendations": [
|
||||||
"jnoortheen.nix-ide",
|
"jnoortheen.nix-ide",
|
||||||
"detachhead.basedpyright",
|
"detachhead.basedpyright",
|
||||||
"mkhl.direnv",
|
"mkhl.direnv"
|
||||||
"mermaidchart.vscode-mermaid-chart"
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,49 +0,0 @@
|
|||||||
when:
|
|
||||||
- event: push
|
|
||||||
branch: fresh-start
|
|
||||||
|
|
||||||
skip_clone: true
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Get kubernetes access from OpenBao
|
|
||||||
image: quay.io/openbao/openbao:2.5.2
|
|
||||||
environment:
|
|
||||||
VAULT_ADDR: https://openbao.lumpiasty.xyz:8200
|
|
||||||
ROLE_ID:
|
|
||||||
from_secret: flux_reconcile_role_id
|
|
||||||
SECRET_ID:
|
|
||||||
from_secret: flux_reconcile_secret_id
|
|
||||||
commands:
|
|
||||||
- bao write -field token auth/approle/login
|
|
||||||
role_id=$ROLE_ID
|
|
||||||
secret_id=$SECRET_ID > /woodpecker/.vault_id
|
|
||||||
- export VAULT_TOKEN=$(cat /woodpecker/.vault_id)
|
|
||||||
- bao write -format json -f /kubernetes/creds/flux-reconcile > /woodpecker/kube_credentials
|
|
||||||
- name: Construct Kubeconfig
|
|
||||||
image: alpine/k8s:1.35.3
|
|
||||||
environment:
|
|
||||||
KUBECONFIG: /woodpecker/kubeconfig
|
|
||||||
commands:
|
|
||||||
- kubectl config set-cluster cluster
|
|
||||||
--server=https://$KUBERNETES_SERVICE_HOST
|
|
||||||
--certificate-authority=/var/run/secrets/kubernetes.io/serviceaccount/ca.crt
|
|
||||||
- kubectl config set-credentials cluster
|
|
||||||
--token=$(jq -r .data.service_account_token /woodpecker/kube_credentials)
|
|
||||||
- kubectl config set-context cluster
|
|
||||||
--cluster cluster
|
|
||||||
--user cluster
|
|
||||||
--namespace flux-system
|
|
||||||
- kubectl config use-context cluster
|
|
||||||
- name: Reconcile git source
|
|
||||||
image: ghcr.io/fluxcd/flux-cli:v2.8.3
|
|
||||||
environment:
|
|
||||||
KUBECONFIG: /woodpecker/kubeconfig
|
|
||||||
commands:
|
|
||||||
- flux reconcile source git flux-system
|
|
||||||
- name: Invalidate OpenBao token
|
|
||||||
image: quay.io/openbao/openbao:2.5.2
|
|
||||||
environment:
|
|
||||||
VAULT_ADDR: https://openbao.lumpiasty.xyz:8200
|
|
||||||
commands:
|
|
||||||
- export VAULT_TOKEN=$(cat /woodpecker/.vault_id)
|
|
||||||
- bao write -f auth/token/revoke-self
|
|
||||||
4
Makefile
4
Makefile
@@ -1,7 +1,3 @@
|
|||||||
SHELL := /usr/bin/env bash
|
|
||||||
|
|
||||||
.PHONY: install-router gen-talos-config apply-talos-config get-kubeconfig
|
|
||||||
|
|
||||||
install-router:
|
install-router:
|
||||||
ansible-playbook ansible/playbook.yml -i ansible/hosts
|
ansible-playbook ansible/playbook.yml -i ansible/hosts
|
||||||
|
|
||||||
|
|||||||
18
README.md
18
README.md
@@ -2,8 +2,6 @@
|
|||||||
|
|
||||||
This repo contains configuration and documentation for my homelab setup, which is based on Talos OS for Kubernetes cluster and MikroTik router.
|
This repo contains configuration and documentation for my homelab setup, which is based on Talos OS for Kubernetes cluster and MikroTik router.
|
||||||
|
|
||||||
[<img src="https://woodpecker.lumpiasty.xyz/api/badges/2/status.svg" alt="Pipeline status">](https://woodpecker.lumpiasty.xyz/repos/2)
|
|
||||||
|
|
||||||
## Architecture
|
## Architecture
|
||||||
|
|
||||||
Physical setup consists of MikroTik router which connects to the internet and serves as a gateway for the cluster and other devices in the home network as shown in the diagram below.
|
Physical setup consists of MikroTik router which connects to the internet and serves as a gateway for the cluster and other devices in the home network as shown in the diagram below.
|
||||||
@@ -143,7 +141,7 @@ Currently the k8s cluster consists of single node (hostname anapistula-delrosala
|
|||||||
|
|
||||||
## Software stack
|
## Software stack
|
||||||
|
|
||||||
The cluster itself is based on [Talos Linux](https://www.talos.dev/) (which is also a Kubernetes distribution) and uses [Cilium](https://cilium.io/) as CNI, IPAM, kube-proxy replacement, Load Balancer, and BGP control plane. Persistent volumes are managed by [OpenEBS LVM LocalPV](https://openebs.io/docs/user-guides/local-storage-user-guide/local-pv-lvm/lvm-overview). Applications are deployed using GitOps (this repo) and reconciled on cluster using [Flux](https://fluxcd.io/). Git repository is hosted on [Gitea](https://gitea.io/) running on a cluster itself. Secets are kept in [OpenBao](https://openbao.org/) (HashiCorp Vault fork) running on a cluster and synced to cluster objects using [Vault Secrets Operator](https://github.com/hashicorp/vault-secrets-operator). Deployments are kept up to date using self hosted [Renovate](https://www.mend.io/renovate/) bot updating manifests in the Git repository. There is a [Woodpecker](https://woodpecker-ci.org/) instance watching repositories on Gitea and scheduling jobs on cluster. Incoming HTTP traffic is routed to cluster using [Nginx Ingress Controller](https://kubernetes.github.io/ingress-nginx/) and certificates are issued by [cert-manager](https://cert-manager.io/) with [Let's Encrypt](https://letsencrypt.org/) ACME issuer with [cert-manager-webhook-ovh](https://github.com/aureq/cert-manager-webhook-ovh) resolving DNS-01 challanges. Cluster also runs [CloudNativePG](https://cloudnative-pg.io/) operator for managing PostgreSQL databases. Router is running [Mikrotik RouterOS](https://help.mikrotik.com/docs/spaces/ROS/pages/328059/RouterOS) and its configuration is managed via [Ansible](https://docs.ansible.com/) playbook in this repo. High level core cluster software architecture is shown on the diagram below.
|
The cluster itself is based on [Talos Linux](https://www.talos.dev/) (which is also a Kubernetes distribution) and uses [Cilium](https://cilium.io/) as CNI, IPAM, kube-proxy replacement, Load Balancer, and BGP control plane. Persistent volumes are managed by [OpenEBS LVM LocalPV](https://openebs.io/docs/user-guides/local-storage-user-guide/local-pv-lvm/lvm-overview). Applications are deployed using GitOps (this repo) and reconciled on cluster using [Flux](https://fluxcd.io/). Git repository is hosted on [Gitea](https://gitea.io/) running on a cluster itself. Secets are kept in [OpenBao](https://openbao.org/) (HashiCorp Vault fork) running on a cluster and synced to cluster objects using [Vault Secrets Operator](https://github.com/hashicorp/vault-secrets-operator). Deployments are kept up to date using self hosted [Renovate](https://www.mend.io/renovate/) bot updating manifests in the Git repository. Incoming HTTP traffic is routed to cluster using [Nginx Ingress Controller](https://kubernetes.github.io/ingress-nginx/) and certificates are issued by [cert-manager](https://cert-manager.io/) with [Let's Encrypt](https://letsencrypt.org/) ACME issuer with [cert-manager-webhook-ovh](https://github.com/aureq/cert-manager-webhook-ovh) resolving DNS-01 challanges. Cluster also runs [CloudNativePG](https://cloudnative-pg.io/) operator for managing PostgreSQL databases. Router is running [Mikrotik RouterOS](https://help.mikrotik.com/docs/spaces/ROS/pages/328059/RouterOS) and its configuration is managed via [Ansible](https://docs.ansible.com/) playbook in this repo. High level core cluster software architecture is shown on the diagram below.
|
||||||
|
|
||||||
> Talos Linux is an immutable Linux distribution purpose-built for running Kubernetes. The OS is distributed as an OCI (Docker) image and does not contain any package manager, shell, SSH, or any other tools for managing the system. Instead, all operations are performed using API, which can be accessed using `talosctl` CLI tool.
|
> Talos Linux is an immutable Linux distribution purpose-built for running Kubernetes. The OS is distributed as an OCI (Docker) image and does not contain any package manager, shell, SSH, or any other tools for managing the system. Instead, all operations are performed using API, which can be accessed using `talosctl` CLI tool.
|
||||||
|
|
||||||
@@ -179,23 +177,14 @@ flowchart TD
|
|||||||
vault_operator -- "Retrieves secrets" --> vault[OpenBao] -- "Secret storage" --> lv
|
vault_operator -- "Retrieves secrets" --> vault[OpenBao] -- "Secret storage" --> lv
|
||||||
vault -- "Auth method" --> kubeapi
|
vault -- "Auth method" --> kubeapi
|
||||||
|
|
||||||
gitea -- "Receives events" --> woodpecker[Woodpecker CI] -- "Schedules jobs" --> kubeapi
|
|
||||||
|
|
||||||
gitea -- "Stores repositories" --> lv
|
gitea -- "Stores repositories" --> lv
|
||||||
|
|
||||||
gitea--> renovate[Renovate Bot] -- "Updates manifests" --> gitea
|
gitea --> renovate[Renovate Bot] -- "Updates manifests" --> gitea
|
||||||
|
|
||||||
|
|
||||||
end
|
end
|
||||||
```
|
```
|
||||||
|
|
||||||
### Reconcilation paths of each component
|
|
||||||
|
|
||||||
- Kubernetes manifests are reconciled using Flux triggerred by Woodpecker CI on push
|
|
||||||
- RouterOS configs are applied by Ansible <!-- ran by Gitea Action on push -->
|
|
||||||
- Talos configs are applied using makefile <!-- switch to ansible and trigger on action push -->
|
|
||||||
- Vault policies are applied by running `synchronize-vault.py` <!-- triggerred by Gitea action on push -->
|
|
||||||
<!-- - Docker images are built and pushed to registry by Gitea Actions on push -->
|
|
||||||
|
|
||||||
<!-- TODO: Backups, monitoring, logging, deployment with ansible etc -->
|
<!-- TODO: Backups, monitoring, logging, deployment with ansible etc -->
|
||||||
|
|
||||||
## Software
|
## Software
|
||||||
@@ -239,7 +228,6 @@ flowchart TD
|
|||||||
|------|------|-------------|
|
|------|------|-------------|
|
||||||
| <img src="docs/assets/devenv.svg" alt="devenv" height="50" width="50"> | devenv | Tool for declarative managment of development environment using Nix |
|
| <img src="docs/assets/devenv.svg" alt="devenv" height="50" width="50"> | devenv | Tool for declarative managment of development environment using Nix |
|
||||||
| <img src="docs/assets/renovate.svg" alt="Renovate" height="50" width="50"> | Renovate | Bot for keeping dependencies up to date |
|
| <img src="docs/assets/renovate.svg" alt="Renovate" height="50" width="50"> | Renovate | Bot for keeping dependencies up to date |
|
||||||
| <img src="docs/assets/woodpecker.svg" alt="Woodpecker" height="50" width="50"> | Woodpecker CI | Continous Integration system |
|
|
||||||
|
|
||||||
### AI infrastructure
|
### AI infrastructure
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +0,0 @@
|
|||||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
|
||||||
kind: Kustomization
|
|
||||||
resources:
|
|
||||||
- namespace.yaml
|
|
||||||
- postgres-volume.yaml
|
|
||||||
- postgres-cluster.yaml
|
|
||||||
- secret.yaml
|
|
||||||
- release.yaml
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
apiVersion: v1
|
|
||||||
kind: Namespace
|
|
||||||
metadata:
|
|
||||||
name: authentik
|
|
||||||
@@ -1,23 +0,0 @@
|
|||||||
---
|
|
||||||
apiVersion: postgresql.cnpg.io/v1
|
|
||||||
kind: Cluster
|
|
||||||
metadata:
|
|
||||||
name: authentik-postgresql-cluster-lvmhdd
|
|
||||||
namespace: authentik
|
|
||||||
spec:
|
|
||||||
instances: 1
|
|
||||||
|
|
||||||
imageName: ghcr.io/cloudnative-pg/postgresql:17.4
|
|
||||||
|
|
||||||
bootstrap:
|
|
||||||
initdb:
|
|
||||||
database: authentik
|
|
||||||
owner: authentik
|
|
||||||
|
|
||||||
storage:
|
|
||||||
pvcTemplate:
|
|
||||||
storageClassName: hdd-lvmpv
|
|
||||||
resources:
|
|
||||||
requests:
|
|
||||||
storage: 10Gi
|
|
||||||
volumeName: authentik-postgresql-cluster-lvmhdd-1
|
|
||||||
@@ -1,61 +0,0 @@
|
|||||||
---
|
|
||||||
apiVersion: source.toolkit.fluxcd.io/v1
|
|
||||||
kind: HelmRepository
|
|
||||||
metadata:
|
|
||||||
name: authentik
|
|
||||||
namespace: authentik
|
|
||||||
spec:
|
|
||||||
interval: 24h
|
|
||||||
url: https://charts.goauthentik.io
|
|
||||||
---
|
|
||||||
apiVersion: helm.toolkit.fluxcd.io/v2
|
|
||||||
kind: HelmRelease
|
|
||||||
metadata:
|
|
||||||
name: authentik
|
|
||||||
namespace: authentik
|
|
||||||
spec:
|
|
||||||
interval: 30m
|
|
||||||
chart:
|
|
||||||
spec:
|
|
||||||
chart: authentik
|
|
||||||
version: 2026.2.1
|
|
||||||
sourceRef:
|
|
||||||
kind: HelmRepository
|
|
||||||
name: authentik
|
|
||||||
namespace: authentik
|
|
||||||
interval: 12h
|
|
||||||
values:
|
|
||||||
authentik:
|
|
||||||
postgresql:
|
|
||||||
host: authentik-postgresql-cluster-lvmhdd-rw
|
|
||||||
name: authentik
|
|
||||||
user: authentik
|
|
||||||
|
|
||||||
global:
|
|
||||||
env:
|
|
||||||
- name: AUTHENTIK_SECRET_KEY
|
|
||||||
valueFrom:
|
|
||||||
secretKeyRef:
|
|
||||||
name: authentik-secret
|
|
||||||
key: secret_key
|
|
||||||
- name: AUTHENTIK_POSTGRESQL__PASSWORD
|
|
||||||
valueFrom:
|
|
||||||
secretKeyRef:
|
|
||||||
name: authentik-postgresql-cluster-lvmhdd-app
|
|
||||||
key: password
|
|
||||||
|
|
||||||
postgresql:
|
|
||||||
enabled: false
|
|
||||||
|
|
||||||
server:
|
|
||||||
ingress:
|
|
||||||
enabled: true
|
|
||||||
ingressClassName: nginx-ingress
|
|
||||||
annotations:
|
|
||||||
cert-manager.io/cluster-issuer: letsencrypt
|
|
||||||
hosts:
|
|
||||||
- authentik.lumpiasty.xyz
|
|
||||||
tls:
|
|
||||||
- secretName: authentik-ingress
|
|
||||||
hosts:
|
|
||||||
- authentik.lumpiasty.xyz
|
|
||||||
@@ -1,38 +0,0 @@
|
|||||||
---
|
|
||||||
apiVersion: v1
|
|
||||||
kind: ServiceAccount
|
|
||||||
metadata:
|
|
||||||
name: authentik-secret
|
|
||||||
namespace: authentik
|
|
||||||
---
|
|
||||||
apiVersion: secrets.hashicorp.com/v1beta1
|
|
||||||
kind: VaultAuth
|
|
||||||
metadata:
|
|
||||||
name: authentik
|
|
||||||
namespace: authentik
|
|
||||||
spec:
|
|
||||||
method: kubernetes
|
|
||||||
mount: kubernetes
|
|
||||||
kubernetes:
|
|
||||||
role: authentik
|
|
||||||
serviceAccount: authentik-secret
|
|
||||||
---
|
|
||||||
apiVersion: secrets.hashicorp.com/v1beta1
|
|
||||||
kind: VaultStaticSecret
|
|
||||||
metadata:
|
|
||||||
name: authentik-secret
|
|
||||||
namespace: authentik
|
|
||||||
spec:
|
|
||||||
type: kv-v2
|
|
||||||
|
|
||||||
mount: secret
|
|
||||||
path: authentik
|
|
||||||
|
|
||||||
destination:
|
|
||||||
create: true
|
|
||||||
name: authentik-secret
|
|
||||||
type: Opaque
|
|
||||||
transformation:
|
|
||||||
excludeRaw: true
|
|
||||||
|
|
||||||
vaultAuthRef: authentik
|
|
||||||
@@ -1,48 +0,0 @@
|
|||||||
apiVersion: apps/v1
|
|
||||||
kind: Deployment
|
|
||||||
metadata:
|
|
||||||
name: crawl4ai-proxy
|
|
||||||
namespace: crawl4ai
|
|
||||||
spec:
|
|
||||||
replicas: 1
|
|
||||||
selector:
|
|
||||||
matchLabels:
|
|
||||||
app: crawl4ai-proxy
|
|
||||||
template:
|
|
||||||
metadata:
|
|
||||||
labels:
|
|
||||||
app: crawl4ai-proxy
|
|
||||||
spec:
|
|
||||||
containers:
|
|
||||||
- name: crawl4ai-proxy
|
|
||||||
image: gitea.lumpiasty.xyz/lumpiasty/crawl4ai-proxy-fit:latest
|
|
||||||
imagePullPolicy: Always
|
|
||||||
env:
|
|
||||||
- name: LISTEN_PORT
|
|
||||||
value: "8000"
|
|
||||||
- name: CRAWL4AI_ENDPOINT
|
|
||||||
value: http://crawl4ai.crawl4ai.svc.cluster.local:11235/crawl
|
|
||||||
ports:
|
|
||||||
- name: http
|
|
||||||
containerPort: 8000
|
|
||||||
readinessProbe:
|
|
||||||
tcpSocket:
|
|
||||||
port: http
|
|
||||||
initialDelaySeconds: 3
|
|
||||||
periodSeconds: 10
|
|
||||||
timeoutSeconds: 2
|
|
||||||
failureThreshold: 6
|
|
||||||
livenessProbe:
|
|
||||||
tcpSocket:
|
|
||||||
port: http
|
|
||||||
initialDelaySeconds: 10
|
|
||||||
periodSeconds: 15
|
|
||||||
timeoutSeconds: 2
|
|
||||||
failureThreshold: 6
|
|
||||||
resources:
|
|
||||||
requests:
|
|
||||||
cpu: 25m
|
|
||||||
memory: 32Mi
|
|
||||||
limits:
|
|
||||||
cpu: 200m
|
|
||||||
memory: 128Mi
|
|
||||||
@@ -1,14 +0,0 @@
|
|||||||
apiVersion: v1
|
|
||||||
kind: Service
|
|
||||||
metadata:
|
|
||||||
name: crawl4ai-proxy
|
|
||||||
namespace: crawl4ai
|
|
||||||
spec:
|
|
||||||
type: ClusterIP
|
|
||||||
selector:
|
|
||||||
app: crawl4ai-proxy
|
|
||||||
ports:
|
|
||||||
- name: http
|
|
||||||
port: 8000
|
|
||||||
targetPort: 8000
|
|
||||||
protocol: TCP
|
|
||||||
@@ -1,62 +0,0 @@
|
|||||||
apiVersion: apps/v1
|
|
||||||
kind: Deployment
|
|
||||||
metadata:
|
|
||||||
name: crawl4ai
|
|
||||||
namespace: crawl4ai
|
|
||||||
spec:
|
|
||||||
replicas: 1
|
|
||||||
selector:
|
|
||||||
matchLabels:
|
|
||||||
app: crawl4ai
|
|
||||||
template:
|
|
||||||
metadata:
|
|
||||||
labels:
|
|
||||||
app: crawl4ai
|
|
||||||
spec:
|
|
||||||
containers:
|
|
||||||
- name: crawl4ai
|
|
||||||
image: unclecode/crawl4ai:latest
|
|
||||||
imagePullPolicy: IfNotPresent
|
|
||||||
env:
|
|
||||||
- name: CRAWL4AI_API_TOKEN
|
|
||||||
valueFrom:
|
|
||||||
secretKeyRef:
|
|
||||||
name: crawl4ai-secret
|
|
||||||
key: api_token
|
|
||||||
optional: false
|
|
||||||
- name: MAX_CONCURRENT_TASKS
|
|
||||||
value: "5"
|
|
||||||
ports:
|
|
||||||
- name: http
|
|
||||||
containerPort: 11235
|
|
||||||
readinessProbe:
|
|
||||||
httpGet:
|
|
||||||
path: /health
|
|
||||||
port: http
|
|
||||||
initialDelaySeconds: 10
|
|
||||||
periodSeconds: 10
|
|
||||||
timeoutSeconds: 3
|
|
||||||
failureThreshold: 6
|
|
||||||
livenessProbe:
|
|
||||||
httpGet:
|
|
||||||
path: /health
|
|
||||||
port: http
|
|
||||||
initialDelaySeconds: 30
|
|
||||||
periodSeconds: 15
|
|
||||||
timeoutSeconds: 3
|
|
||||||
failureThreshold: 6
|
|
||||||
resources:
|
|
||||||
requests:
|
|
||||||
cpu: 500m
|
|
||||||
memory: 1Gi
|
|
||||||
limits:
|
|
||||||
cpu: "2"
|
|
||||||
memory: 4Gi
|
|
||||||
volumeMounts:
|
|
||||||
- name: dshm
|
|
||||||
mountPath: /dev/shm
|
|
||||||
volumes:
|
|
||||||
- name: dshm
|
|
||||||
emptyDir:
|
|
||||||
medium: Memory
|
|
||||||
sizeLimit: 1Gi
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
|
||||||
kind: Kustomization
|
|
||||||
resources:
|
|
||||||
- namespace.yaml
|
|
||||||
- secret.yaml
|
|
||||||
- deployment.yaml
|
|
||||||
- service.yaml
|
|
||||||
@@ -1,38 +0,0 @@
|
|||||||
---
|
|
||||||
apiVersion: v1
|
|
||||||
kind: ServiceAccount
|
|
||||||
metadata:
|
|
||||||
name: crawl4ai-secret
|
|
||||||
namespace: crawl4ai
|
|
||||||
---
|
|
||||||
apiVersion: secrets.hashicorp.com/v1beta1
|
|
||||||
kind: VaultAuth
|
|
||||||
metadata:
|
|
||||||
name: crawl4ai
|
|
||||||
namespace: crawl4ai
|
|
||||||
spec:
|
|
||||||
method: kubernetes
|
|
||||||
mount: kubernetes
|
|
||||||
kubernetes:
|
|
||||||
role: crawl4ai
|
|
||||||
serviceAccount: crawl4ai-secret
|
|
||||||
---
|
|
||||||
apiVersion: secrets.hashicorp.com/v1beta1
|
|
||||||
kind: VaultStaticSecret
|
|
||||||
metadata:
|
|
||||||
name: crawl4ai-secret
|
|
||||||
namespace: crawl4ai
|
|
||||||
spec:
|
|
||||||
type: kv-v2
|
|
||||||
|
|
||||||
mount: secret
|
|
||||||
path: crawl4ai
|
|
||||||
|
|
||||||
destination:
|
|
||||||
create: true
|
|
||||||
name: crawl4ai-secret
|
|
||||||
type: Opaque
|
|
||||||
transformation:
|
|
||||||
excludeRaw: true
|
|
||||||
|
|
||||||
vaultAuthRef: crawl4ai
|
|
||||||
@@ -1,14 +0,0 @@
|
|||||||
apiVersion: v1
|
|
||||||
kind: Service
|
|
||||||
metadata:
|
|
||||||
name: crawl4ai
|
|
||||||
namespace: crawl4ai
|
|
||||||
spec:
|
|
||||||
type: ClusterIP
|
|
||||||
selector:
|
|
||||||
app: crawl4ai
|
|
||||||
ports:
|
|
||||||
- name: http
|
|
||||||
port: 11235
|
|
||||||
targetPort: 11235
|
|
||||||
protocol: TCP
|
|
||||||
@@ -72,8 +72,6 @@ spec:
|
|||||||
indexer:
|
indexer:
|
||||||
ISSUE_INDEXER_TYPE: bleve
|
ISSUE_INDEXER_TYPE: bleve
|
||||||
REPO_INDEXER_ENABLED: true
|
REPO_INDEXER_ENABLED: true
|
||||||
webhook:
|
|
||||||
ALLOWED_HOST_LIST: woodpecker.lumpiasty.xyz
|
|
||||||
admin:
|
admin:
|
||||||
username: GiteaAdmin
|
username: GiteaAdmin
|
||||||
email: gi@tea.com
|
email: gi@tea.com
|
||||||
@@ -90,11 +88,6 @@ spec:
|
|||||||
# Requirement for sharing ip with other service
|
# Requirement for sharing ip with other service
|
||||||
externalTrafficPolicy: Cluster
|
externalTrafficPolicy: Cluster
|
||||||
ipFamilyPolicy: RequireDualStack
|
ipFamilyPolicy: RequireDualStack
|
||||||
http:
|
|
||||||
type: ClusterIP
|
|
||||||
# We need the service to be at port 80 specifically
|
|
||||||
# to work around bug of Actions Runner
|
|
||||||
port: 80
|
|
||||||
|
|
||||||
ingress:
|
ingress:
|
||||||
enabled: true
|
enabled: true
|
||||||
@@ -102,7 +95,7 @@ spec:
|
|||||||
annotations:
|
annotations:
|
||||||
cert-manager.io/cluster-issuer: letsencrypt
|
cert-manager.io/cluster-issuer: letsencrypt
|
||||||
acme.cert-manager.io/http01-edit-in-place: "true"
|
acme.cert-manager.io/http01-edit-in-place: "true"
|
||||||
nginx.ingress.kubernetes.io/proxy-body-size: "1g"
|
nginx.ingress.kubernetes.io/proxy-body-size: "100m"
|
||||||
hosts:
|
hosts:
|
||||||
- host: gitea.lumpiasty.xyz
|
- host: gitea.lumpiasty.xyz
|
||||||
paths:
|
paths:
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ spec:
|
|||||||
chart:
|
chart:
|
||||||
spec:
|
spec:
|
||||||
chart: immich
|
chart: immich
|
||||||
version: 1.2.2
|
version: 1.1.1
|
||||||
sourceRef:
|
sourceRef:
|
||||||
kind: HelmRepository
|
kind: HelmRepository
|
||||||
name: secustor
|
name: secustor
|
||||||
|
|||||||
@@ -1,15 +1,13 @@
|
|||||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||||
kind: Kustomization
|
kind: Kustomization
|
||||||
resources:
|
resources:
|
||||||
- crawl4ai
|
|
||||||
- crawl4ai-proxy
|
|
||||||
- authentik
|
|
||||||
- gitea
|
- gitea
|
||||||
- renovate
|
- renovate
|
||||||
|
- librechat
|
||||||
- frigate
|
- frigate
|
||||||
- llama
|
- llama
|
||||||
- immich
|
- immich
|
||||||
- nas
|
- nas
|
||||||
|
- searxng
|
||||||
- ispeak3
|
- ispeak3
|
||||||
- openwebui
|
- openwebui
|
||||||
- woodpecker
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||||
kind: Kustomization
|
kind: Kustomization
|
||||||
resources:
|
resources:
|
||||||
- deployment.yaml
|
- namespace.yaml
|
||||||
- service.yaml
|
- release.yaml
|
||||||
@@ -2,4 +2,4 @@
|
|||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: Namespace
|
kind: Namespace
|
||||||
metadata:
|
metadata:
|
||||||
name: woodpecker
|
name: librechat
|
||||||
120
apps/librechat/release.yaml
Normal file
120
apps/librechat/release.yaml
Normal file
@@ -0,0 +1,120 @@
|
|||||||
|
---
|
||||||
|
apiVersion: source.toolkit.fluxcd.io/v1
|
||||||
|
kind: HelmRepository
|
||||||
|
metadata:
|
||||||
|
name: dynomite567-charts
|
||||||
|
namespace: librechat
|
||||||
|
spec:
|
||||||
|
interval: 24h
|
||||||
|
url: https://dynomite567.github.io/helm-charts/
|
||||||
|
---
|
||||||
|
# apiVersion: helm.toolkit.fluxcd.io/v2
|
||||||
|
# kind: HelmRelease
|
||||||
|
# metadata:
|
||||||
|
# name: librechat
|
||||||
|
# namespace: librechat
|
||||||
|
# spec:
|
||||||
|
# interval: 30m
|
||||||
|
# chart:
|
||||||
|
# spec:
|
||||||
|
# chart: librechat
|
||||||
|
# version: 1.9.1
|
||||||
|
# sourceRef:
|
||||||
|
# kind: HelmRepository
|
||||||
|
# name: dynomite567-charts
|
||||||
|
# values:
|
||||||
|
# global:
|
||||||
|
# librechat:
|
||||||
|
# existingSecretName: librechat
|
||||||
|
# librechat:
|
||||||
|
# configEnv:
|
||||||
|
# PLUGIN_MODELS: null
|
||||||
|
# ALLOW_REGISTRATION: "false"
|
||||||
|
# TRUST_PROXY: "1"
|
||||||
|
# DOMAIN_CLIENT: https://librechat.lumpiasty.xyz
|
||||||
|
# SEARCH: "true"
|
||||||
|
# existingSecretName: librechat
|
||||||
|
# configYamlContent: |
|
||||||
|
# version: 1.0.3
|
||||||
|
|
||||||
|
# endpoints:
|
||||||
|
# custom:
|
||||||
|
# - name: "Llama.cpp"
|
||||||
|
# apiKey: "llama"
|
||||||
|
# baseURL: "http://llama.llama.svc.cluster.local:11434/v1"
|
||||||
|
# models:
|
||||||
|
# default: [
|
||||||
|
# "DeepSeek-R1-0528-Qwen3-8B-GGUF",
|
||||||
|
# "Qwen3-8B-GGUF",
|
||||||
|
# "Qwen3-8B-GGUF-no-thinking",
|
||||||
|
# "gemma3n-e4b",
|
||||||
|
# "gemma3-12b",
|
||||||
|
# "gemma3-12b-q2",
|
||||||
|
# "gemma3-12b-novision",
|
||||||
|
# "gemma3-4b",
|
||||||
|
# "gemma3-4b-novision",
|
||||||
|
# "Qwen3-4B-Thinking-2507",
|
||||||
|
# "Qwen3-4B-Thinking-2507-long-ctx",
|
||||||
|
# "Qwen2.5-VL-7B-Instruct-GGUF",
|
||||||
|
# "Qwen2.5-VL-32B-Instruct-GGUF-IQ1_S",
|
||||||
|
# "Qwen2.5-VL-32B-Instruct-GGUF-Q2_K_L",
|
||||||
|
# "Qwen3-VL-2B-Instruct-GGUF",
|
||||||
|
# "Qwen3-VL-2B-Instruct-GGUF-unslothish",
|
||||||
|
# "Qwen3-VL-2B-Thinking-GGUF",
|
||||||
|
# "Qwen3-VL-4B-Instruct-GGUF",
|
||||||
|
# "Qwen3-VL-4B-Instruct-GGUF-unslothish",
|
||||||
|
# "Qwen3-VL-4B-Thinking-GGUF",
|
||||||
|
# "Qwen3-VL-8B-Instruct-GGUF",
|
||||||
|
# "Qwen3-VL-8B-Instruct-GGUF-unslothish",
|
||||||
|
# "Qwen3-VL-8B-Thinking-GGUF",
|
||||||
|
# "Huihui-Qwen3-VL-8B-Instruct-abliterated-GGUF",
|
||||||
|
# "Huihui-Qwen3-VL-8B-Thinking-abliterated-GGUF"
|
||||||
|
# ]
|
||||||
|
# titleConvo: true
|
||||||
|
# titleModel: "gemma3-4b-novision"
|
||||||
|
# summarize: false
|
||||||
|
# summaryModel: "gemma3-4b-novision"
|
||||||
|
# forcePrompt: false
|
||||||
|
# modelDisplayLabel: "Llama.cpp"
|
||||||
|
|
||||||
|
# # ✨ IMPORTANT: let llama-swap/llama-server own all these
|
||||||
|
# dropParams:
|
||||||
|
# - "temperature"
|
||||||
|
# - "top_p"
|
||||||
|
# - "top_k"
|
||||||
|
# - "presence_penalty"
|
||||||
|
# - "frequency_penalty"
|
||||||
|
# - "stop"
|
||||||
|
# - "max_tokens"
|
||||||
|
# imageVolume:
|
||||||
|
# enabled: true
|
||||||
|
# size: 10G
|
||||||
|
# accessModes: ReadWriteOnce
|
||||||
|
# storageClassName: mayastor-single-hdd
|
||||||
|
# ingress:
|
||||||
|
# enabled: true
|
||||||
|
# className: nginx-ingress
|
||||||
|
# annotations:
|
||||||
|
# cert-manager.io/cluster-issuer: letsencrypt
|
||||||
|
# nginx.ingress.kubernetes.io/proxy-body-size: "0"
|
||||||
|
# nginx.ingress.kubernetes.io/proxy-buffering: "false"
|
||||||
|
# nginx.ingress.kubernetes.io/proxy-read-timeout: 30m
|
||||||
|
# hosts:
|
||||||
|
# - host: librechat.lumpiasty.xyz
|
||||||
|
# paths:
|
||||||
|
# - path: /
|
||||||
|
# pathType: ImplementationSpecific
|
||||||
|
# tls:
|
||||||
|
# - hosts:
|
||||||
|
# - librechat.lumpiasty.xyz
|
||||||
|
# secretName: librechat-ingress
|
||||||
|
|
||||||
|
# mongodb:
|
||||||
|
# persistence:
|
||||||
|
# storageClass: mayastor-single-hdd
|
||||||
|
|
||||||
|
# meilisearch:
|
||||||
|
# persistence:
|
||||||
|
# storageClass: mayastor-single-hdd
|
||||||
|
# auth:
|
||||||
|
# existingMasterKeySecret: librechat
|
||||||
@@ -4,19 +4,22 @@ logToStdout: "both" # proxy and upstream
|
|||||||
|
|
||||||
macros:
|
macros:
|
||||||
base_args: "--no-warmup --port ${PORT}"
|
base_args: "--no-warmup --port ${PORT}"
|
||||||
common_args: "--fit-target 1536 --no-warmup --port ${PORT}"
|
common_args: "--fit-target 1536 --fit-ctx 65536 --no-warmup --port ${PORT}"
|
||||||
ctx_128k: "--ctx-size 131072"
|
|
||||||
ctx_256k: "--ctx-size 262144"
|
|
||||||
gemma_sampling: "--prio 2 --temp 1.0 --repeat-penalty 1.0 --min-p 0.00 --top-k 64 --top-p 0.95"
|
gemma_sampling: "--prio 2 --temp 1.0 --repeat-penalty 1.0 --min-p 0.00 --top-k 64 --top-p 0.95"
|
||||||
qwen35_sampling: "--temp 0.6 --top-p 0.95 --top-k 20 --min-p 0.00 -ctk q8_0 -ctv q8_0"
|
qwen35_sampling: "--temp 0.6 --top-p 0.95 --top-k 20 --min-p 0.00 -ctk q4_0 -ctv q4_0"
|
||||||
qwen35_35b_args: "--temp 1.0 --min-p 0.00 --top-p 0.95 --top-k 20 -ctk q8_0 -ctv q8_0"
|
qwen35_35b_args: "--temp 1.0 --min-p 0.00 --top-p 0.95 --top-k 20 -ctk q4_0 -ctv q4_0"
|
||||||
qwen35_35b_heretic_mmproj: "--mmproj-url https://huggingface.co/unsloth/Qwen3.5-35B-A3B-GGUF/resolve/main/mmproj-F16.gguf --mmproj /root/.cache/llama.cpp/unsloth_Qwen3.5-35B-A3B-GGUF_mmproj-F16.gguf"
|
qwen35_35b_heretic_mmproj: "--mmproj-url https://huggingface.co/unsloth/Qwen3.5-35B-A3B-GGUF/resolve/main/mmproj-F16.gguf --mmproj /root/.cache/llama.cpp/unsloth_Qwen3.5-35B-A3B-GGUF_mmproj-F16.gguf"
|
||||||
qwen35_4b_heretic_mmproj: "--mmproj-url https://huggingface.co/unsloth/Qwen3.5-4B-GGUF/resolve/main/mmproj-F16.gguf --mmproj /root/.cache/llama.cpp/unsloth_Qwen3.5-4B-GGUF_mmproj-F16.gguf"
|
qwen35_4b_heretic_mmproj: "--mmproj-url https://huggingface.co/unsloth/Qwen3.5-4B-GGUF/resolve/main/mmproj-F16.gguf --mmproj /root/.cache/llama.cpp/unsloth_Qwen3.5-4B-GGUF_mmproj-F16.gguf"
|
||||||
glm47_flash_args: "--temp 0.7 --top-p 1.0 --min-p 0.01 --repeat-penalty 1.0"
|
|
||||||
gemma4_sampling: "--temp 1.0 --top-p 0.95 --top-k 64"
|
|
||||||
thinking_on: "--chat-template-kwargs '{\"enable_thinking\": true}'"
|
thinking_on: "--chat-template-kwargs '{\"enable_thinking\": true}'"
|
||||||
thinking_off: "--chat-template-kwargs '{\"enable_thinking\": false}'"
|
thinking_off: "--chat-template-kwargs '{\"enable_thinking\": false}'"
|
||||||
|
|
||||||
|
peers:
|
||||||
|
openrouter:
|
||||||
|
proxy: https://openrouter.ai/api
|
||||||
|
apiKey: ${env.OPENROUTER_API_KEY}
|
||||||
|
models:
|
||||||
|
- z-ai/glm-5
|
||||||
|
|
||||||
hooks:
|
hooks:
|
||||||
on_startup:
|
on_startup:
|
||||||
preload:
|
preload:
|
||||||
@@ -35,7 +38,6 @@ models:
|
|||||||
cmd: |
|
cmd: |
|
||||||
/app/llama-server
|
/app/llama-server
|
||||||
-hf unsloth/gemma-3-12b-it-GGUF:Q4_K_M
|
-hf unsloth/gemma-3-12b-it-GGUF:Q4_K_M
|
||||||
${ctx_128k}
|
|
||||||
${gemma_sampling}
|
${gemma_sampling}
|
||||||
${common_args}
|
${common_args}
|
||||||
|
|
||||||
@@ -43,7 +45,6 @@ models:
|
|||||||
cmd: |
|
cmd: |
|
||||||
/app/llama-server
|
/app/llama-server
|
||||||
-hf unsloth/gemma-3-12b-it-GGUF:Q4_K_M
|
-hf unsloth/gemma-3-12b-it-GGUF:Q4_K_M
|
||||||
${ctx_128k}
|
|
||||||
${gemma_sampling}
|
${gemma_sampling}
|
||||||
--no-mmproj
|
--no-mmproj
|
||||||
${common_args}
|
${common_args}
|
||||||
@@ -52,7 +53,6 @@ models:
|
|||||||
cmd: |
|
cmd: |
|
||||||
/app/llama-server
|
/app/llama-server
|
||||||
-hf unsloth/gemma-3-4b-it-GGUF:Q4_K_M
|
-hf unsloth/gemma-3-4b-it-GGUF:Q4_K_M
|
||||||
${ctx_128k}
|
|
||||||
${gemma_sampling}
|
${gemma_sampling}
|
||||||
${common_args}
|
${common_args}
|
||||||
|
|
||||||
@@ -60,7 +60,6 @@ models:
|
|||||||
cmd: |
|
cmd: |
|
||||||
/app/llama-server
|
/app/llama-server
|
||||||
-hf unsloth/gemma-3-4b-it-GGUF:Q4_K_M
|
-hf unsloth/gemma-3-4b-it-GGUF:Q4_K_M
|
||||||
${ctx_128k}
|
|
||||||
${gemma_sampling}
|
${gemma_sampling}
|
||||||
--no-mmproj
|
--no-mmproj
|
||||||
${common_args}
|
${common_args}
|
||||||
@@ -76,14 +75,13 @@ models:
|
|||||||
--top-p 0.95
|
--top-p 0.95
|
||||||
--top-k 40
|
--top-k 40
|
||||||
--repeat-penalty 1.0
|
--repeat-penalty 1.0
|
||||||
-ctk q8_0 -ctv q8_0
|
-ctk q4_0 -ctv q4_0
|
||||||
${common_args}
|
${common_args}
|
||||||
|
|
||||||
"Qwen3.5-35B-A3B-GGUF:Q4_K_M":
|
"Qwen3.5-35B-A3B-GGUF:Q4_K_M":
|
||||||
cmd: |
|
cmd: |
|
||||||
/app/llama-server
|
/app/llama-server
|
||||||
-hf unsloth/Qwen3.5-35B-A3B-GGUF:Q4_K_M
|
-hf unsloth/Qwen3.5-35B-A3B-GGUF:Q4_K_M
|
||||||
${ctx_256k}
|
|
||||||
${qwen35_35b_args}
|
${qwen35_35b_args}
|
||||||
${common_args}
|
${common_args}
|
||||||
|
|
||||||
@@ -91,7 +89,6 @@ models:
|
|||||||
cmd: |
|
cmd: |
|
||||||
/app/llama-server
|
/app/llama-server
|
||||||
-hf unsloth/Qwen3.5-35B-A3B-GGUF:Q4_K_M
|
-hf unsloth/Qwen3.5-35B-A3B-GGUF:Q4_K_M
|
||||||
${ctx_256k}
|
|
||||||
${qwen35_35b_args}
|
${qwen35_35b_args}
|
||||||
${common_args}
|
${common_args}
|
||||||
${thinking_off}
|
${thinking_off}
|
||||||
@@ -103,7 +100,6 @@ models:
|
|||||||
/app/llama-server
|
/app/llama-server
|
||||||
-hf mradermacher/Qwen3.5-35B-A3B-heretic-GGUF:Q4_K_M
|
-hf mradermacher/Qwen3.5-35B-A3B-heretic-GGUF:Q4_K_M
|
||||||
${qwen35_35b_heretic_mmproj}
|
${qwen35_35b_heretic_mmproj}
|
||||||
${ctx_256k}
|
|
||||||
${qwen35_35b_args}
|
${qwen35_35b_args}
|
||||||
${common_args}
|
${common_args}
|
||||||
|
|
||||||
@@ -112,7 +108,6 @@ models:
|
|||||||
/app/llama-server
|
/app/llama-server
|
||||||
-hf mradermacher/Qwen3.5-35B-A3B-heretic-GGUF:Q4_K_M
|
-hf mradermacher/Qwen3.5-35B-A3B-heretic-GGUF:Q4_K_M
|
||||||
${qwen35_35b_heretic_mmproj}
|
${qwen35_35b_heretic_mmproj}
|
||||||
${ctx_256k}
|
|
||||||
${qwen35_35b_args}
|
${qwen35_35b_args}
|
||||||
${common_args}
|
${common_args}
|
||||||
${thinking_off}
|
${thinking_off}
|
||||||
@@ -121,7 +116,6 @@ models:
|
|||||||
cmd: |
|
cmd: |
|
||||||
/app/llama-server
|
/app/llama-server
|
||||||
-hf unsloth/Qwen3.5-0.8B-GGUF:Q4_K_XL
|
-hf unsloth/Qwen3.5-0.8B-GGUF:Q4_K_XL
|
||||||
${ctx_256k}
|
|
||||||
${qwen35_sampling}
|
${qwen35_sampling}
|
||||||
${base_args}
|
${base_args}
|
||||||
${thinking_on}
|
${thinking_on}
|
||||||
@@ -139,7 +133,6 @@ models:
|
|||||||
cmd: |
|
cmd: |
|
||||||
/app/llama-server
|
/app/llama-server
|
||||||
-hf unsloth/Qwen3.5-2B-GGUF:Q4_K_M
|
-hf unsloth/Qwen3.5-2B-GGUF:Q4_K_M
|
||||||
${ctx_256k}
|
|
||||||
${qwen35_sampling}
|
${qwen35_sampling}
|
||||||
${common_args}
|
${common_args}
|
||||||
${thinking_on}
|
${thinking_on}
|
||||||
@@ -148,7 +141,6 @@ models:
|
|||||||
cmd: |
|
cmd: |
|
||||||
/app/llama-server
|
/app/llama-server
|
||||||
-hf unsloth/Qwen3.5-2B-GGUF:Q4_K_M
|
-hf unsloth/Qwen3.5-2B-GGUF:Q4_K_M
|
||||||
${ctx_256k}
|
|
||||||
${qwen35_sampling}
|
${qwen35_sampling}
|
||||||
${common_args}
|
${common_args}
|
||||||
${thinking_off}
|
${thinking_off}
|
||||||
@@ -157,7 +149,6 @@ models:
|
|||||||
cmd: |
|
cmd: |
|
||||||
/app/llama-server
|
/app/llama-server
|
||||||
-hf unsloth/Qwen3.5-4B-GGUF:Q4_K_M
|
-hf unsloth/Qwen3.5-4B-GGUF:Q4_K_M
|
||||||
${ctx_128k}
|
|
||||||
${qwen35_sampling}
|
${qwen35_sampling}
|
||||||
${common_args}
|
${common_args}
|
||||||
${thinking_on}
|
${thinking_on}
|
||||||
@@ -166,7 +157,6 @@ models:
|
|||||||
cmd: |
|
cmd: |
|
||||||
/app/llama-server
|
/app/llama-server
|
||||||
-hf unsloth/Qwen3.5-4B-GGUF:Q4_K_M
|
-hf unsloth/Qwen3.5-4B-GGUF:Q4_K_M
|
||||||
${ctx_128k}
|
|
||||||
${qwen35_sampling}
|
${qwen35_sampling}
|
||||||
${common_args}
|
${common_args}
|
||||||
${thinking_off}
|
${thinking_off}
|
||||||
@@ -176,7 +166,6 @@ models:
|
|||||||
/app/llama-server
|
/app/llama-server
|
||||||
-hf mradermacher/Qwen3.5-4B-heretic-GGUF:Q4_K_M
|
-hf mradermacher/Qwen3.5-4B-heretic-GGUF:Q4_K_M
|
||||||
${qwen35_4b_heretic_mmproj}
|
${qwen35_4b_heretic_mmproj}
|
||||||
${ctx_128k}
|
|
||||||
${qwen35_sampling}
|
${qwen35_sampling}
|
||||||
${common_args}
|
${common_args}
|
||||||
${thinking_on}
|
${thinking_on}
|
||||||
@@ -186,7 +175,6 @@ models:
|
|||||||
/app/llama-server
|
/app/llama-server
|
||||||
-hf mradermacher/Qwen3.5-4B-heretic-GGUF:Q4_K_M
|
-hf mradermacher/Qwen3.5-4B-heretic-GGUF:Q4_K_M
|
||||||
${qwen35_4b_heretic_mmproj}
|
${qwen35_4b_heretic_mmproj}
|
||||||
${ctx_128k}
|
|
||||||
${qwen35_sampling}
|
${qwen35_sampling}
|
||||||
${common_args}
|
${common_args}
|
||||||
${thinking_off}
|
${thinking_off}
|
||||||
@@ -195,7 +183,6 @@ models:
|
|||||||
cmd: |
|
cmd: |
|
||||||
/app/llama-server
|
/app/llama-server
|
||||||
-hf unsloth/Qwen3.5-9B-GGUF:Q4_K_M
|
-hf unsloth/Qwen3.5-9B-GGUF:Q4_K_M
|
||||||
${ctx_256k}
|
|
||||||
${qwen35_sampling}
|
${qwen35_sampling}
|
||||||
${common_args}
|
${common_args}
|
||||||
${thinking_on}
|
${thinking_on}
|
||||||
@@ -204,7 +191,6 @@ models:
|
|||||||
cmd: |
|
cmd: |
|
||||||
/app/llama-server
|
/app/llama-server
|
||||||
-hf unsloth/Qwen3.5-9B-GGUF:Q4_K_M
|
-hf unsloth/Qwen3.5-9B-GGUF:Q4_K_M
|
||||||
${ctx_256k}
|
|
||||||
${qwen35_sampling}
|
${qwen35_sampling}
|
||||||
${common_args}
|
${common_args}
|
||||||
${thinking_off}
|
${thinking_off}
|
||||||
@@ -213,7 +199,6 @@ models:
|
|||||||
cmd: |
|
cmd: |
|
||||||
/app/llama-server
|
/app/llama-server
|
||||||
-hf unsloth/Qwen3.5-9B-GGUF:Q3_K_M
|
-hf unsloth/Qwen3.5-9B-GGUF:Q3_K_M
|
||||||
${ctx_256k}
|
|
||||||
${qwen35_sampling}
|
${qwen35_sampling}
|
||||||
${common_args}
|
${common_args}
|
||||||
${thinking_on}
|
${thinking_on}
|
||||||
@@ -222,7 +207,6 @@ models:
|
|||||||
cmd: |
|
cmd: |
|
||||||
/app/llama-server
|
/app/llama-server
|
||||||
-hf unsloth/Qwen3.5-9B-GGUF:Q3_K_M
|
-hf unsloth/Qwen3.5-9B-GGUF:Q3_K_M
|
||||||
${ctx_256k}
|
|
||||||
${qwen35_sampling}
|
${qwen35_sampling}
|
||||||
${common_args}
|
${common_args}
|
||||||
${thinking_off}
|
${thinking_off}
|
||||||
@@ -231,7 +215,6 @@ models:
|
|||||||
cmd: |
|
cmd: |
|
||||||
/app/llama-server
|
/app/llama-server
|
||||||
-hf unsloth/Qwen3.5-27B-GGUF:Q3_K_M
|
-hf unsloth/Qwen3.5-27B-GGUF:Q3_K_M
|
||||||
${ctx_256k}
|
|
||||||
${qwen35_sampling}
|
${qwen35_sampling}
|
||||||
${common_args}
|
${common_args}
|
||||||
${thinking_on}
|
${thinking_on}
|
||||||
@@ -240,46 +223,6 @@ models:
|
|||||||
cmd: |
|
cmd: |
|
||||||
/app/llama-server
|
/app/llama-server
|
||||||
-hf unsloth/Qwen3.5-27B-GGUF:Q3_K_M
|
-hf unsloth/Qwen3.5-27B-GGUF:Q3_K_M
|
||||||
${ctx_256k}
|
|
||||||
${qwen35_sampling}
|
${qwen35_sampling}
|
||||||
${common_args}
|
${common_args}
|
||||||
${thinking_off}
|
${thinking_off}
|
||||||
|
|
||||||
"GLM-4.7-Flash-GGUF:Q4_K_M":
|
|
||||||
cmd: |
|
|
||||||
/app/llama-server
|
|
||||||
-hf unsloth/GLM-4.7-Flash-GGUF:Q4_K_M
|
|
||||||
${glm47_flash_args}
|
|
||||||
${common_args}
|
|
||||||
|
|
||||||
"gemma-4-26B-A4B-it:UD-Q4_K_XL":
|
|
||||||
cmd: |
|
|
||||||
/app/llama-server
|
|
||||||
-hf unsloth/gemma-4-26B-A4B-it-GGUF:UD-Q4_K_XL \
|
|
||||||
${ctx_256k}
|
|
||||||
${gemma4_sampling}
|
|
||||||
${common_args}
|
|
||||||
|
|
||||||
"gemma-4-26B-A4B-it:UD-Q2_K_XL":
|
|
||||||
cmd: |
|
|
||||||
/app/llama-server
|
|
||||||
-hf unsloth/gemma-4-26B-A4B-it-GGUF:UD-Q2_K_XL \
|
|
||||||
${ctx_256k}
|
|
||||||
${gemma4_sampling}
|
|
||||||
${common_args}
|
|
||||||
|
|
||||||
"unsloth/gemma-4-E4B-it-GGUF:UD-Q4_K_XL":
|
|
||||||
cmd: |
|
|
||||||
/app/llama-server
|
|
||||||
-hf unsloth/gemma-4-E4B-it-GGUF:UD-Q4_K_XL \
|
|
||||||
${ctx_128k}
|
|
||||||
${gemma4_sampling}
|
|
||||||
${common_args}
|
|
||||||
|
|
||||||
"unsloth/gemma-4-E2B-it-GGUF:UD-Q4_K_XL":
|
|
||||||
cmd: |
|
|
||||||
/app/llama-server
|
|
||||||
-hf unsloth/gemma-4-E2B-it-GGUF:UD-Q4_K_XL \
|
|
||||||
${ctx_128k}
|
|
||||||
${gemma4_sampling}
|
|
||||||
${common_args}
|
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ spec:
|
|||||||
spec:
|
spec:
|
||||||
containers:
|
containers:
|
||||||
- name: llama-swap
|
- name: llama-swap
|
||||||
image: ghcr.io/mostlygeek/llama-swap:v199-vulkan-b8667
|
image: ghcr.io/mostlygeek/llama-swap:v197-vulkan-b8248
|
||||||
imagePullPolicy: IfNotPresent
|
imagePullPolicy: IfNotPresent
|
||||||
command:
|
command:
|
||||||
- /app/llama-swap
|
- /app/llama-swap
|
||||||
@@ -29,6 +29,12 @@ spec:
|
|||||||
- containerPort: 8080
|
- containerPort: 8080
|
||||||
name: http
|
name: http
|
||||||
protocol: TCP
|
protocol: TCP
|
||||||
|
env:
|
||||||
|
- name: OPENROUTER_API_KEY
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: llama-openrouter
|
||||||
|
key: OPENROUTER_API_KEY
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
- name: models
|
- name: models
|
||||||
mountPath: /root/.cache
|
mountPath: /root/.cache
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ metadata:
|
|||||||
name: llama-models-lvmssd
|
name: llama-models-lvmssd
|
||||||
namespace: openebs
|
namespace: openebs
|
||||||
spec:
|
spec:
|
||||||
capacity: "322122547200"
|
capacity: 200Gi
|
||||||
ownerNodeID: anapistula-delrosalae
|
ownerNodeID: anapistula-delrosalae
|
||||||
shared: "yes"
|
shared: "yes"
|
||||||
thinProvision: "no"
|
thinProvision: "no"
|
||||||
@@ -20,7 +20,7 @@ metadata:
|
|||||||
name: llama-models-lvmssd
|
name: llama-models-lvmssd
|
||||||
spec:
|
spec:
|
||||||
capacity:
|
capacity:
|
||||||
storage: 300Gi
|
storage: 200Gi
|
||||||
accessModes:
|
accessModes:
|
||||||
- ReadWriteOnce
|
- ReadWriteOnce
|
||||||
persistentVolumeReclaimPolicy: Retain
|
persistentVolumeReclaimPolicy: Retain
|
||||||
@@ -41,6 +41,6 @@ spec:
|
|||||||
- ReadWriteOnce
|
- ReadWriteOnce
|
||||||
resources:
|
resources:
|
||||||
requests:
|
requests:
|
||||||
storage: 300Gi
|
storage: 200Gi
|
||||||
storageClassName: ssd-lvmpv
|
storageClassName: ssd-lvmpv
|
||||||
volumeName: llama-models-lvmssd
|
volumeName: llama-models-lvmssd
|
||||||
@@ -36,3 +36,26 @@ spec:
|
|||||||
excludeRaw: true
|
excludeRaw: true
|
||||||
|
|
||||||
vaultAuthRef: llama
|
vaultAuthRef: llama
|
||||||
|
---
|
||||||
|
apiVersion: secrets.hashicorp.com/v1beta1
|
||||||
|
kind: VaultStaticSecret
|
||||||
|
metadata:
|
||||||
|
name: llama-openrouter
|
||||||
|
namespace: llama
|
||||||
|
spec:
|
||||||
|
type: kv-v2
|
||||||
|
|
||||||
|
mount: secret
|
||||||
|
path: openrouter
|
||||||
|
|
||||||
|
destination:
|
||||||
|
create: true
|
||||||
|
name: llama-openrouter
|
||||||
|
type: Opaque
|
||||||
|
transformation:
|
||||||
|
excludeRaw: true
|
||||||
|
templates:
|
||||||
|
OPENROUTER_API_KEY:
|
||||||
|
text: '{{ get .Secrets "API_KEY" }}'
|
||||||
|
|
||||||
|
vaultAuthRef: llama
|
||||||
|
|||||||
@@ -4,6 +4,5 @@ resources:
|
|||||||
- namespace.yaml
|
- namespace.yaml
|
||||||
- pvc.yaml
|
- pvc.yaml
|
||||||
- pvc-pipelines.yaml
|
- pvc-pipelines.yaml
|
||||||
- secret.yaml
|
|
||||||
- release.yaml
|
- release.yaml
|
||||||
- ingress.yaml
|
- ingress.yaml
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ spec:
|
|||||||
chart:
|
chart:
|
||||||
spec:
|
spec:
|
||||||
chart: open-webui
|
chart: open-webui
|
||||||
version: 13.0.1
|
version: 12.10.0
|
||||||
sourceRef:
|
sourceRef:
|
||||||
kind: HelmRepository
|
kind: HelmRepository
|
||||||
name: open-webui
|
name: open-webui
|
||||||
@@ -44,33 +44,3 @@ spec:
|
|||||||
persistence:
|
persistence:
|
||||||
enabled: true
|
enabled: true
|
||||||
existingClaim: openwebui-pipelines-lvmhdd
|
existingClaim: openwebui-pipelines-lvmhdd
|
||||||
|
|
||||||
terminals:
|
|
||||||
enabled: true
|
|
||||||
|
|
||||||
# SSO with Authentik
|
|
||||||
extraEnvVars:
|
|
||||||
- name: WEBUI_URL
|
|
||||||
value: "https://openwebui.lumpiasty.xyz"
|
|
||||||
- name: OAUTH_CLIENT_ID
|
|
||||||
valueFrom:
|
|
||||||
secretKeyRef:
|
|
||||||
name: openwebui-authentik
|
|
||||||
key: client_id
|
|
||||||
- name: OAUTH_CLIENT_SECRET
|
|
||||||
valueFrom:
|
|
||||||
secretKeyRef:
|
|
||||||
name: openwebui-authentik
|
|
||||||
key: client_secret
|
|
||||||
- name: OAUTH_PROVIDER_NAME
|
|
||||||
value: "authentik"
|
|
||||||
- name: OPENID_PROVIDER_URL
|
|
||||||
value: "https://authentik.lumpiasty.xyz/application/o/open-web-ui/.well-known/openid-configuration"
|
|
||||||
- name: OPENID_REDIRECT_URI
|
|
||||||
value: "https://openwebui.lumpiasty.xyz/oauth/oidc/callback"
|
|
||||||
- name: ENABLE_OAUTH_SIGNUP
|
|
||||||
value: "true"
|
|
||||||
- name: ENABLE_LOGIN_FORM
|
|
||||||
value: "false"
|
|
||||||
- name: OAUTH_MERGE_ACCOUNTS_BY_EMAIL
|
|
||||||
value: "true"
|
|
||||||
|
|||||||
@@ -1,43 +0,0 @@
|
|||||||
---
|
|
||||||
apiVersion: v1
|
|
||||||
kind: ServiceAccount
|
|
||||||
metadata:
|
|
||||||
name: openwebui-secret
|
|
||||||
namespace: openwebui
|
|
||||||
---
|
|
||||||
apiVersion: secrets.hashicorp.com/v1beta1
|
|
||||||
kind: VaultAuth
|
|
||||||
metadata:
|
|
||||||
name: openwebui
|
|
||||||
namespace: openwebui
|
|
||||||
spec:
|
|
||||||
method: kubernetes
|
|
||||||
mount: kubernetes
|
|
||||||
kubernetes:
|
|
||||||
role: openwebui
|
|
||||||
serviceAccount: openwebui-secret
|
|
||||||
---
|
|
||||||
apiVersion: secrets.hashicorp.com/v1beta1
|
|
||||||
kind: VaultStaticSecret
|
|
||||||
metadata:
|
|
||||||
name: openwebui-authentik
|
|
||||||
namespace: openwebui
|
|
||||||
spec:
|
|
||||||
type: kv-v2
|
|
||||||
|
|
||||||
mount: secret
|
|
||||||
path: authentik/openwebui
|
|
||||||
|
|
||||||
destination:
|
|
||||||
create: true
|
|
||||||
name: openwebui-authentik
|
|
||||||
type: Opaque
|
|
||||||
transformation:
|
|
||||||
excludeRaw: true
|
|
||||||
templates:
|
|
||||||
client_id:
|
|
||||||
text: '{{ get .Secrets "client_id" }}'
|
|
||||||
client_secret:
|
|
||||||
text: '{{ get .Secrets "client_secret" }}'
|
|
||||||
|
|
||||||
vaultAuthRef: openwebui
|
|
||||||
@@ -15,7 +15,7 @@ spec:
|
|||||||
- name: renovate
|
- name: renovate
|
||||||
# Update this to the latest available and then enable Renovate on
|
# Update this to the latest available and then enable Renovate on
|
||||||
# the manifest
|
# the manifest
|
||||||
image: renovate/renovate:43.104.8-full
|
image: renovate/renovate:43.64.6-full
|
||||||
envFrom:
|
envFrom:
|
||||||
- secretRef:
|
- secretRef:
|
||||||
name: renovate-gitea-token
|
name: renovate-gitea-token
|
||||||
|
|||||||
1
apps/searxng/configs/settings.yml
Normal file
1
apps/searxng/configs/settings.yml
Normal file
@@ -0,0 +1 @@
|
|||||||
|
use_default_settings: true
|
||||||
42
apps/searxng/deployment.yaml
Normal file
42
apps/searxng/deployment.yaml
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
---
|
||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: searxng
|
||||||
|
namespace: searxng
|
||||||
|
spec:
|
||||||
|
replicas: 1
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: searxng
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: searxng
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- name: searxng
|
||||||
|
image: searxng/searxng:2025.8.12-6b1516d
|
||||||
|
ports:
|
||||||
|
- containerPort: 8080
|
||||||
|
env:
|
||||||
|
- name: SEARXNG_SECRET
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: searxng-secret
|
||||||
|
key: SEARXNG_SECRET
|
||||||
|
optional: false
|
||||||
|
volumeMounts:
|
||||||
|
- name: config-volume
|
||||||
|
mountPath: /etc/searxng/settings.yml
|
||||||
|
subPath: settings.yml
|
||||||
|
readOnly: true
|
||||||
|
- name: searxng-persistent-data
|
||||||
|
mountPath: /var/cache/searxng
|
||||||
|
volumes:
|
||||||
|
- name: config-volume
|
||||||
|
configMap:
|
||||||
|
name: searxng-config
|
||||||
|
- name: searxng-persistent-data
|
||||||
|
persistentVolumeClaim:
|
||||||
|
claimName: searxng-persistent-data-lvmhdd
|
||||||
25
apps/searxng/ingress.yaml
Normal file
25
apps/searxng/ingress.yaml
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
---
|
||||||
|
apiVersion: networking.k8s.io/v1
|
||||||
|
kind: Ingress
|
||||||
|
metadata:
|
||||||
|
namespace: searxng
|
||||||
|
name: searxng
|
||||||
|
annotations:
|
||||||
|
cert-manager.io/cluster-issuer: letsencrypt
|
||||||
|
spec:
|
||||||
|
ingressClassName: nginx-ingress
|
||||||
|
rules:
|
||||||
|
- host: searxng.lumpiasty.xyz
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- backend:
|
||||||
|
service:
|
||||||
|
name: searxng
|
||||||
|
port:
|
||||||
|
number: 8080
|
||||||
|
path: /
|
||||||
|
pathType: Prefix
|
||||||
|
tls:
|
||||||
|
- hosts:
|
||||||
|
- searxng.lumpiasty.xyz
|
||||||
|
secretName: searxng-ingress
|
||||||
13
apps/searxng/kustomization.yaml
Normal file
13
apps/searxng/kustomization.yaml
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||||
|
kind: Kustomization
|
||||||
|
resources:
|
||||||
|
- namespace.yaml
|
||||||
|
- pvc.yaml
|
||||||
|
- deployment.yaml
|
||||||
|
- service.yaml
|
||||||
|
- ingress.yaml
|
||||||
|
configMapGenerator:
|
||||||
|
- name: searxng-config
|
||||||
|
namespace: searxng
|
||||||
|
files:
|
||||||
|
- settings.yml=configs/settings.yml
|
||||||
@@ -1,4 +1,5 @@
|
|||||||
|
---
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: Namespace
|
kind: Namespace
|
||||||
metadata:
|
metadata:
|
||||||
name: crawl4ai
|
name: searxng
|
||||||
@@ -1,12 +1,13 @@
|
|||||||
|
---
|
||||||
apiVersion: local.openebs.io/v1alpha1
|
apiVersion: local.openebs.io/v1alpha1
|
||||||
kind: LVMVolume
|
kind: LVMVolume
|
||||||
metadata:
|
metadata:
|
||||||
labels:
|
labels:
|
||||||
kubernetes.io/nodename: anapistula-delrosalae
|
kubernetes.io/nodename: anapistula-delrosalae
|
||||||
name: authentik-postgresql-cluster-lvmhdd-1
|
name: searxng-persistent-data-lvmhdd
|
||||||
namespace: openebs
|
namespace: openebs
|
||||||
spec:
|
spec:
|
||||||
capacity: 10Gi
|
capacity: 1Gi
|
||||||
ownerNodeID: anapistula-delrosalae
|
ownerNodeID: anapistula-delrosalae
|
||||||
shared: "yes"
|
shared: "yes"
|
||||||
thinProvision: "no"
|
thinProvision: "no"
|
||||||
@@ -16,10 +17,10 @@ spec:
|
|||||||
kind: PersistentVolume
|
kind: PersistentVolume
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
metadata:
|
metadata:
|
||||||
name: authentik-postgresql-cluster-lvmhdd-1
|
name: searxng-persistent-data-lvmhdd
|
||||||
spec:
|
spec:
|
||||||
capacity:
|
capacity:
|
||||||
storage: 10Gi
|
storage: 1Gi
|
||||||
accessModes:
|
accessModes:
|
||||||
- ReadWriteOnce
|
- ReadWriteOnce
|
||||||
persistentVolumeReclaimPolicy: Retain
|
persistentVolumeReclaimPolicy: Retain
|
||||||
@@ -28,6 +29,18 @@ spec:
|
|||||||
csi:
|
csi:
|
||||||
driver: local.csi.openebs.io
|
driver: local.csi.openebs.io
|
||||||
fsType: btrfs
|
fsType: btrfs
|
||||||
volumeHandle: authentik-postgresql-cluster-lvmhdd-1
|
volumeHandle: searxng-persistent-data-lvmhdd
|
||||||
---
|
---
|
||||||
# PVCs are dynamically created by the Postgres operator
|
kind: PersistentVolumeClaim
|
||||||
|
apiVersion: v1
|
||||||
|
metadata:
|
||||||
|
name: searxng-persistent-data-lvmhdd
|
||||||
|
namespace: searxng
|
||||||
|
spec:
|
||||||
|
accessModes:
|
||||||
|
- ReadWriteOnce
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
storage: 1Gi
|
||||||
|
storageClassName: hdd-lvmpv
|
||||||
|
volumeName: searxng-persistent-data-lvmhdd
|
||||||
14
apps/searxng/service.yaml
Normal file
14
apps/searxng/service.yaml
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: searxng
|
||||||
|
namespace: searxng
|
||||||
|
spec:
|
||||||
|
selector:
|
||||||
|
app: searxng
|
||||||
|
ports:
|
||||||
|
- protocol: TCP
|
||||||
|
port: 8080
|
||||||
|
targetPort: 8080
|
||||||
|
type: ClusterIP
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
|
||||||
kind: Kustomization
|
|
||||||
resources:
|
|
||||||
- namespace.yaml
|
|
||||||
- postgres-volume.yaml
|
|
||||||
- postgres-cluster.yaml
|
|
||||||
- release.yaml
|
|
||||||
- secret.yaml
|
|
||||||
@@ -1,23 +0,0 @@
|
|||||||
---
|
|
||||||
apiVersion: postgresql.cnpg.io/v1
|
|
||||||
kind: Cluster
|
|
||||||
metadata:
|
|
||||||
name: woodpecker-postgresql-cluster
|
|
||||||
namespace: woodpecker
|
|
||||||
spec:
|
|
||||||
instances: 1
|
|
||||||
|
|
||||||
imageName: ghcr.io/cloudnative-pg/postgresql:17.4
|
|
||||||
|
|
||||||
bootstrap:
|
|
||||||
initdb:
|
|
||||||
database: woodpecker
|
|
||||||
owner: woodpecker
|
|
||||||
|
|
||||||
storage:
|
|
||||||
pvcTemplate:
|
|
||||||
storageClassName: ssd-lvmpv
|
|
||||||
resources:
|
|
||||||
requests:
|
|
||||||
storage: 10Gi
|
|
||||||
volumeName: woodpecker-postgresql-cluster-lvmssd
|
|
||||||
@@ -1,33 +0,0 @@
|
|||||||
apiVersion: local.openebs.io/v1alpha1
|
|
||||||
kind: LVMVolume
|
|
||||||
metadata:
|
|
||||||
labels:
|
|
||||||
kubernetes.io/nodename: anapistula-delrosalae
|
|
||||||
name: woodpecker-postgresql-cluster-lvmssd
|
|
||||||
namespace: openebs
|
|
||||||
spec:
|
|
||||||
capacity: 10Gi
|
|
||||||
ownerNodeID: anapistula-delrosalae
|
|
||||||
shared: "yes"
|
|
||||||
thinProvision: "no"
|
|
||||||
vgPattern: ^openebs-ssd$
|
|
||||||
volGroup: openebs-ssd
|
|
||||||
---
|
|
||||||
kind: PersistentVolume
|
|
||||||
apiVersion: v1
|
|
||||||
metadata:
|
|
||||||
name: woodpecker-postgresql-cluster-lvmssd
|
|
||||||
spec:
|
|
||||||
capacity:
|
|
||||||
storage: 10Gi
|
|
||||||
accessModes:
|
|
||||||
- ReadWriteOnce
|
|
||||||
persistentVolumeReclaimPolicy: Retain
|
|
||||||
storageClassName: ssd-lvmpv
|
|
||||||
volumeMode: Filesystem
|
|
||||||
csi:
|
|
||||||
driver: local.csi.openebs.io
|
|
||||||
fsType: btrfs
|
|
||||||
volumeHandle: woodpecker-postgresql-cluster-lvmssd
|
|
||||||
---
|
|
||||||
# PVC is dynamically created by the Postgres operator
|
|
||||||
@@ -1,115 +0,0 @@
|
|||||||
---
|
|
||||||
apiVersion: source.toolkit.fluxcd.io/v1
|
|
||||||
kind: HelmRepository
|
|
||||||
metadata:
|
|
||||||
name: woodpecker
|
|
||||||
namespace: woodpecker
|
|
||||||
spec:
|
|
||||||
interval: 24h
|
|
||||||
url: https://woodpecker-ci.org/
|
|
||||||
---
|
|
||||||
apiVersion: helm.toolkit.fluxcd.io/v2
|
|
||||||
kind: HelmRelease
|
|
||||||
metadata:
|
|
||||||
name: woodpecker
|
|
||||||
namespace: woodpecker
|
|
||||||
spec:
|
|
||||||
interval: 30m
|
|
||||||
chart:
|
|
||||||
spec:
|
|
||||||
chart: woodpecker
|
|
||||||
version: 3.5.1
|
|
||||||
sourceRef:
|
|
||||||
kind: HelmRepository
|
|
||||||
name: woodpecker
|
|
||||||
namespace: woodpecker
|
|
||||||
interval: 12h
|
|
||||||
values:
|
|
||||||
server:
|
|
||||||
enabled: true
|
|
||||||
statefulSet:
|
|
||||||
replicaCount: 1
|
|
||||||
|
|
||||||
persistentVolume:
|
|
||||||
enabled: false # Using Postgresql database
|
|
||||||
|
|
||||||
env:
|
|
||||||
WOODPECKER_HOST: "https://woodpecker.lumpiasty.xyz"
|
|
||||||
# Gitea integration
|
|
||||||
WOODPECKER_GITEA: "true"
|
|
||||||
WOODPECKER_GITEA_URL: "https://gitea.lumpiasty.xyz"
|
|
||||||
# PostgreSQL database configuration
|
|
||||||
WOODPECKER_DATABASE_DRIVER: postgres
|
|
||||||
# Password is loaded from woodpecker-postgresql-cluster-app secret (created by CNPG)
|
|
||||||
WOODPECKER_DATABASE_DATASOURCE:
|
|
||||||
valueFrom:
|
|
||||||
secretKeyRef:
|
|
||||||
name: woodpecker-postgresql-cluster-app
|
|
||||||
key: fqdn-uri
|
|
||||||
# Allow logging in from all accounts on Gitea
|
|
||||||
WOODPECKER_OPEN: "true"
|
|
||||||
# Make lumpiasty admin
|
|
||||||
WOODPECKER_ADMIN: GiteaAdmin
|
|
||||||
|
|
||||||
createAgentSecret: true
|
|
||||||
|
|
||||||
extraSecretNamesForEnvFrom:
|
|
||||||
- woodpecker-secrets
|
|
||||||
|
|
||||||
ingress:
|
|
||||||
enabled: true
|
|
||||||
ingressClassName: nginx-ingress
|
|
||||||
annotations:
|
|
||||||
cert-manager.io/cluster-issuer: letsencrypt
|
|
||||||
acme.cert-manager.io/http01-edit-in-place: "true"
|
|
||||||
hosts:
|
|
||||||
- host: woodpecker.lumpiasty.xyz
|
|
||||||
paths:
|
|
||||||
- path: /
|
|
||||||
backend:
|
|
||||||
serviceName: woodpecker-server
|
|
||||||
servicePort: 80
|
|
||||||
tls:
|
|
||||||
- hosts:
|
|
||||||
- woodpecker.lumpiasty.xyz
|
|
||||||
secretName: woodpecker-ingress
|
|
||||||
|
|
||||||
resources:
|
|
||||||
requests:
|
|
||||||
cpu: 100m
|
|
||||||
memory: 256Mi
|
|
||||||
|
|
||||||
service:
|
|
||||||
type: ClusterIP
|
|
||||||
port: 80
|
|
||||||
|
|
||||||
agent:
|
|
||||||
enabled: true
|
|
||||||
replicaCount: 2
|
|
||||||
|
|
||||||
env:
|
|
||||||
WOODPECKER_SERVER: "woodpecker-server:9000"
|
|
||||||
WOODPECKER_BACKEND: kubernetes
|
|
||||||
WOODPECKER_BACKEND_K8S_NAMESPACE: woodpecker
|
|
||||||
WOODPECKER_BACKEND_K8S_STORAGE_CLASS: ssd-lvmpv
|
|
||||||
WOODPECKER_BACKEND_K8S_VOLUME_SIZE: 10G
|
|
||||||
WOODPECKER_BACKEND_K8S_STORAGE_RWX: false
|
|
||||||
WOODPECKER_CONNECT_RETRY_COUNT: "5"
|
|
||||||
|
|
||||||
mapAgentSecret: true
|
|
||||||
|
|
||||||
extraSecretNamesForEnvFrom:
|
|
||||||
- woodpecker-secrets
|
|
||||||
|
|
||||||
persistence:
|
|
||||||
enabled: false
|
|
||||||
|
|
||||||
serviceAccount:
|
|
||||||
create: true
|
|
||||||
rbac:
|
|
||||||
create: true
|
|
||||||
|
|
||||||
resources:
|
|
||||||
requests:
|
|
||||||
cpu: 100m
|
|
||||||
memory: 128Mi
|
|
||||||
@@ -1,62 +0,0 @@
|
|||||||
---
|
|
||||||
apiVersion: v1
|
|
||||||
kind: ServiceAccount
|
|
||||||
metadata:
|
|
||||||
name: woodpecker-secret
|
|
||||||
namespace: woodpecker
|
|
||||||
---
|
|
||||||
apiVersion: secrets.hashicorp.com/v1beta1
|
|
||||||
kind: VaultAuth
|
|
||||||
metadata:
|
|
||||||
name: woodpecker
|
|
||||||
namespace: woodpecker
|
|
||||||
spec:
|
|
||||||
method: kubernetes
|
|
||||||
mount: kubernetes
|
|
||||||
kubernetes:
|
|
||||||
role: woodpecker
|
|
||||||
serviceAccount: woodpecker-secret
|
|
||||||
---
|
|
||||||
# Main woodpecker secrets from Vault
|
|
||||||
# Requires vault kv put secret/woodpecker \
|
|
||||||
# WOODPECKER_AGENT_SECRET="$(openssl rand -hex 32)" \
|
|
||||||
# WOODPECKER_GITEA_CLIENT="<gitea-oauth-client>" \
|
|
||||||
# WOODPECKER_GITEA_SECRET="<gitea-oauth-secret>"
|
|
||||||
# Note: Database password comes from CNPG secret (woodpecker-postgresql-cluster-app)
|
|
||||||
apiVersion: secrets.hashicorp.com/v1beta1
|
|
||||||
kind: VaultStaticSecret
|
|
||||||
metadata:
|
|
||||||
name: woodpecker-secrets
|
|
||||||
namespace: woodpecker
|
|
||||||
spec:
|
|
||||||
type: kv-v2
|
|
||||||
mount: secret
|
|
||||||
path: woodpecker
|
|
||||||
destination:
|
|
||||||
create: true
|
|
||||||
name: woodpecker-secrets
|
|
||||||
type: Opaque
|
|
||||||
transformation:
|
|
||||||
excludeRaw: true
|
|
||||||
vaultAuthRef: woodpecker
|
|
||||||
---
|
|
||||||
# Container registry credentials for Kaniko
|
|
||||||
# Requires vault kv put secret/container-registry \
|
|
||||||
# REGISTRY_USERNAME="<username>" \
|
|
||||||
# REGISTRY_PASSWORD="<token>"
|
|
||||||
apiVersion: secrets.hashicorp.com/v1beta1
|
|
||||||
kind: VaultStaticSecret
|
|
||||||
metadata:
|
|
||||||
name: container-registry
|
|
||||||
namespace: woodpecker
|
|
||||||
spec:
|
|
||||||
type: kv-v2
|
|
||||||
mount: secret
|
|
||||||
path: container-registry
|
|
||||||
destination:
|
|
||||||
create: true
|
|
||||||
name: container-registry
|
|
||||||
type: Opaque
|
|
||||||
transformation:
|
|
||||||
excludeRaw: true
|
|
||||||
vaultAuthRef: woodpecker
|
|
||||||
@@ -4,7 +4,7 @@ metadata:
|
|||||||
name: apps
|
name: apps
|
||||||
namespace: flux-system
|
namespace: flux-system
|
||||||
spec:
|
spec:
|
||||||
interval: 24h
|
interval: 10m0s
|
||||||
sourceRef:
|
sourceRef:
|
||||||
kind: GitRepository
|
kind: GitRepository
|
||||||
name: flux-system
|
name: flux-system
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ metadata:
|
|||||||
name: flux-system
|
name: flux-system
|
||||||
namespace: flux-system
|
namespace: flux-system
|
||||||
spec:
|
spec:
|
||||||
interval: 24h
|
interval: 1m0s
|
||||||
ref:
|
ref:
|
||||||
branch: fresh-start
|
branch: fresh-start
|
||||||
secretRef:
|
secretRef:
|
||||||
@@ -19,7 +19,7 @@ metadata:
|
|||||||
name: flux-system
|
name: flux-system
|
||||||
namespace: flux-system
|
namespace: flux-system
|
||||||
spec:
|
spec:
|
||||||
interval: 24h
|
interval: 10m0s
|
||||||
path: ./cluster
|
path: ./cluster
|
||||||
prune: true
|
prune: true
|
||||||
sourceRef:
|
sourceRef:
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ metadata:
|
|||||||
name: infra
|
name: infra
|
||||||
namespace: flux-system
|
namespace: flux-system
|
||||||
spec:
|
spec:
|
||||||
interval: 24h
|
interval: 10m0s
|
||||||
sourceRef:
|
sourceRef:
|
||||||
kind: GitRepository
|
kind: GitRepository
|
||||||
name: flux-system
|
name: flux-system
|
||||||
|
|||||||
87
devenv.lock
87
devenv.lock
@@ -3,11 +3,10 @@
|
|||||||
"devenv": {
|
"devenv": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"dir": "src/modules",
|
"dir": "src/modules",
|
||||||
"lastModified": 1775201809,
|
"lastModified": 1769881431,
|
||||||
"narHash": "sha256-WmpoCegCQ6Q2ZyxqO05zlz/7XXjt/l2iut4Nk5Nt+W4=",
|
|
||||||
"owner": "cachix",
|
"owner": "cachix",
|
||||||
"repo": "devenv",
|
"repo": "devenv",
|
||||||
"rev": "42a5505d4700e791732e48a38b4cca05a755f94b",
|
"rev": "72d5e66e2dd5112766ef4c9565872b51094b542d",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -17,13 +16,27 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"flake-compat": {
|
||||||
|
"flake": false,
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1767039857,
|
||||||
|
"owner": "NixOS",
|
||||||
|
"repo": "flake-compat",
|
||||||
|
"rev": "5edf11c44bc78a0d334f6334cdaf7d60d732daab",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "NixOS",
|
||||||
|
"repo": "flake-compat",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"flake-utils": {
|
"flake-utils": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"systems": "systems"
|
"systems": "systems"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1731533236,
|
"lastModified": 1731533236,
|
||||||
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
|
|
||||||
"owner": "numtide",
|
"owner": "numtide",
|
||||||
"repo": "flake-utils",
|
"repo": "flake-utils",
|
||||||
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
|
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
|
||||||
@@ -35,6 +48,47 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"git-hooks": {
|
||||||
|
"inputs": {
|
||||||
|
"flake-compat": "flake-compat",
|
||||||
|
"gitignore": "gitignore",
|
||||||
|
"nixpkgs": [
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1769069492,
|
||||||
|
"owner": "cachix",
|
||||||
|
"repo": "git-hooks.nix",
|
||||||
|
"rev": "a1ef738813b15cf8ec759bdff5761b027e3e1d23",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "cachix",
|
||||||
|
"repo": "git-hooks.nix",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"gitignore": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": [
|
||||||
|
"git-hooks",
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1762808025,
|
||||||
|
"owner": "hercules-ci",
|
||||||
|
"repo": "gitignore.nix",
|
||||||
|
"rev": "cb5e3fdca1de58ccbc3ef53de65bd372b48f567c",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "hercules-ci",
|
||||||
|
"repo": "gitignore.nix",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"krew2nix": {
|
"krew2nix": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-utils": "flake-utils",
|
"flake-utils": "flake-utils",
|
||||||
@@ -45,11 +99,10 @@
|
|||||||
"treefmt-nix": "treefmt-nix"
|
"treefmt-nix": "treefmt-nix"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1775175041,
|
"lastModified": 1769904483,
|
||||||
"narHash": "sha256-lYCPSMIV26VazREzl/TIpbWhBXJ+vJ0EJ+308TrX/6w=",
|
|
||||||
"owner": "a1994sc",
|
"owner": "a1994sc",
|
||||||
"repo": "krew2nix",
|
"repo": "krew2nix",
|
||||||
"rev": "15c594042f1ba80ce97ab190a9c684a44c613590",
|
"rev": "17d6ad3375899bd3f7d4d298481536155f3ec13c",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -60,11 +113,10 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1775036866,
|
"lastModified": 1769461804,
|
||||||
"narHash": "sha256-ZojAnPuCdy657PbTq5V0Y+AHKhZAIwSIT2cb8UgAz/U=",
|
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "6201e203d09599479a3b3450ed24fa81537ebc4e",
|
"rev": "bfc1b8a4574108ceef22f02bafcf6611380c100d",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -77,14 +129,17 @@
|
|||||||
"root": {
|
"root": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"devenv": "devenv",
|
"devenv": "devenv",
|
||||||
|
"git-hooks": "git-hooks",
|
||||||
"krew2nix": "krew2nix",
|
"krew2nix": "krew2nix",
|
||||||
"nixpkgs": "nixpkgs"
|
"nixpkgs": "nixpkgs",
|
||||||
|
"pre-commit-hooks": [
|
||||||
|
"git-hooks"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"systems": {
|
"systems": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1681028828,
|
"lastModified": 1681028828,
|
||||||
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
|
||||||
"owner": "nix-systems",
|
"owner": "nix-systems",
|
||||||
"repo": "default",
|
"repo": "default",
|
||||||
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||||
@@ -99,7 +154,6 @@
|
|||||||
"systems_2": {
|
"systems_2": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1681028828,
|
"lastModified": 1681028828,
|
||||||
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
|
||||||
"owner": "nix-systems",
|
"owner": "nix-systems",
|
||||||
"repo": "default",
|
"repo": "default",
|
||||||
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||||
@@ -119,11 +173,10 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1773297127,
|
"lastModified": 1769691507,
|
||||||
"narHash": "sha256-6E/yhXP7Oy/NbXtf1ktzmU8SdVqJQ09HC/48ebEGBpk=",
|
|
||||||
"owner": "numtide",
|
"owner": "numtide",
|
||||||
"repo": "treefmt-nix",
|
"repo": "treefmt-nix",
|
||||||
"rev": "71b125cd05fbfd78cab3e070b73544abe24c5016",
|
"rev": "28b19c5844cc6e2257801d43f2772a4b4c050a1b",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -135,4 +188,4 @@
|
|||||||
},
|
},
|
||||||
"root": "root",
|
"root": "root",
|
||||||
"version": 7
|
"version": 7
|
||||||
}
|
}
|
||||||
|
|||||||
12
devenv.nix
12
devenv.nix
@@ -41,18 +41,6 @@ in
|
|||||||
openbao
|
openbao
|
||||||
pv-migrate
|
pv-migrate
|
||||||
mermaid-cli
|
mermaid-cli
|
||||||
(
|
|
||||||
# Wrapping opencode to set the OPENCODE_ENABLE_EXA environment variable
|
|
||||||
runCommand "opencode" {
|
|
||||||
buildInputs = [ makeWrapper ];
|
|
||||||
} ''
|
|
||||||
mkdir -p $out/bin
|
|
||||||
makeWrapper ${pkgs.opencode}/bin/opencode $out/bin/opencode \
|
|
||||||
--set OPENCODE_ENABLE_EXA "1"
|
|
||||||
''
|
|
||||||
)
|
|
||||||
tea
|
|
||||||
woodpecker-cli
|
|
||||||
];
|
];
|
||||||
|
|
||||||
# Scripts
|
# Scripts
|
||||||
|
|||||||
@@ -1,10 +0,0 @@
|
|||||||
<svg xmlns="http://www.w3.org/2000/svg" width="284.538" height="253.96">
|
|
||||||
<style>
|
|
||||||
@media (prefers-color-scheme: dark) {
|
|
||||||
path {
|
|
||||||
fill: white;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
<path d="M162.51 33.188c-26.77.411-54.004 6.885-71.494 3.745-1.313-.232-2.124 1.338-1.171 2.265 14.749 14.003 20.335 28.16 36.718 30.065l.476.103c-7.567 7.799-14.028 18.018-18.571 31.171-4.89 14.106-6.268 29.421-7.89 47.105-2.445 26.332-5.173 56.152-20.038 93.54a246.489 246.489 0 0 0-13.27 45.946h22.652a221.202 221.202 0 0 1 11.249-37.786c16.049-40.374 19.073-73.257 21.505-99.693 1.493-16.255 2.806-30.309 6.796-41.853 11.647-33.527 39.408-40.889 61.056-36.693 21.004 4.067 41.673 20.502 40.592 44.016-.772 15.985-7.76 23.166-12.87 28.43-2.793 2.883-5.47 5.611-6.731 9.498-3.037 9.19.101 19.434 8.494 27.568 22.24 20.734 34.338 59.717 33.681 106.513h22.176c.592-52.935-13.951-97.839-40.503-122.626-2.097-2.021-2.69-3.604-3.191-3.347 1.222-1.544 3.217-3.346 4.633-4.813 29.382-21.79 77.813-1.892 107.054 9.653 7.58 2.985 11.274-4.338 4.067-8.623-25.097-14.84-76.54-54.016-105.368-79.718-4.029-3.54-6.796-7.8-11.455-11.738-15.547-27.439-41.84-33.127-68.597-32.728Zm35.238 60.27a15.161 15.161 0 0 0-2.008.232 15.161 15.161 0 0 0-1.506 29.434 15.154 15.154 0 0 0 9.473-28.79 15.161 15.161 0 0 0-5.959-.876zm-44.286 147.17a2.033 2.033 0 0 0-1.133.374c-1.08.772-1.93 3.05-.772 5.701 5.38 12.394 9.1 25.445 12.536 40.413h22.484c-5.676-16.629-16.307-34.055-27.851-43.978-2.008-1.737-3.913-2.574-5.251-2.51z" style="stroke-width:12.8704" transform="translate(-67.27 -33.169)"/>
|
|
||||||
</svg>
|
|
||||||
|
Before Width: | Height: | Size: 1.5 KiB |
@@ -3,8 +3,6 @@ apiVersion: storage.k8s.io/v1
|
|||||||
kind: StorageClass
|
kind: StorageClass
|
||||||
metadata:
|
metadata:
|
||||||
name: ssd-lvmpv
|
name: ssd-lvmpv
|
||||||
annotations:
|
|
||||||
storageclass.kubernetes.io/is-default-class: "true"
|
|
||||||
parameters:
|
parameters:
|
||||||
storage: "lvm"
|
storage: "lvm"
|
||||||
volgroup: "openebs-ssd"
|
volgroup: "openebs-ssd"
|
||||||
|
|||||||
@@ -1,32 +0,0 @@
|
|||||||
# Roles with needed access for OpenBao's Kubernetes secret engine
|
|
||||||
---
|
|
||||||
apiVersion: rbac.authorization.k8s.io/v1
|
|
||||||
kind: ClusterRole
|
|
||||||
metadata:
|
|
||||||
name: k8s-full-secrets-abilities
|
|
||||||
rules:
|
|
||||||
- apiGroups: [""]
|
|
||||||
resources: ["namespaces"]
|
|
||||||
verbs: ["get"]
|
|
||||||
- apiGroups: [""]
|
|
||||||
resources: ["serviceaccounts", "serviceaccounts/token"]
|
|
||||||
verbs: ["create", "update", "delete"]
|
|
||||||
- apiGroups: ["rbac.authorization.k8s.io"]
|
|
||||||
resources: ["rolebindings", "clusterrolebindings"]
|
|
||||||
verbs: ["create", "update", "delete"]
|
|
||||||
- apiGroups: ["rbac.authorization.k8s.io"]
|
|
||||||
resources: ["roles", "clusterroles"]
|
|
||||||
verbs: ["bind", "escalate", "create", "update", "delete"]
|
|
||||||
---
|
|
||||||
apiVersion: rbac.authorization.k8s.io/v1
|
|
||||||
kind: ClusterRoleBinding
|
|
||||||
metadata:
|
|
||||||
name: openbao-token-creator-binding
|
|
||||||
roleRef:
|
|
||||||
apiGroup: rbac.authorization.k8s.io
|
|
||||||
kind: ClusterRole
|
|
||||||
name: k8s-full-secrets-abilities
|
|
||||||
subjects:
|
|
||||||
- kind: ServiceAccount
|
|
||||||
name: openbao
|
|
||||||
namespace: openbao
|
|
||||||
@@ -18,7 +18,7 @@ spec:
|
|||||||
chart:
|
chart:
|
||||||
spec:
|
spec:
|
||||||
chart: cert-manager-webhook-ovh
|
chart: cert-manager-webhook-ovh
|
||||||
version: 0.9.6
|
version: 0.9.4
|
||||||
sourceRef:
|
sourceRef:
|
||||||
kind: HelmRepository
|
kind: HelmRepository
|
||||||
name: cert-manager-webhook-ovh
|
name: cert-manager-webhook-ovh
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ spec:
|
|||||||
chart:
|
chart:
|
||||||
spec:
|
spec:
|
||||||
chart: cert-manager
|
chart: cert-manager
|
||||||
version: v1.20.1
|
version: v1.20.0
|
||||||
sourceRef:
|
sourceRef:
|
||||||
kind: HelmRepository
|
kind: HelmRepository
|
||||||
name: cert-manager
|
name: cert-manager
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ spec:
|
|||||||
chart:
|
chart:
|
||||||
spec:
|
spec:
|
||||||
chart: cilium
|
chart: cilium
|
||||||
version: 1.19.2
|
version: 1.19.1
|
||||||
sourceRef:
|
sourceRef:
|
||||||
kind: HelmRepository
|
kind: HelmRepository
|
||||||
name: cilium
|
name: cilium
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ spec:
|
|||||||
chart:
|
chart:
|
||||||
spec:
|
spec:
|
||||||
chart: cloudnative-pg
|
chart: cloudnative-pg
|
||||||
version: 0.28.0
|
version: 0.27.1
|
||||||
sourceRef:
|
sourceRef:
|
||||||
kind: HelmRepository
|
kind: HelmRepository
|
||||||
name: cnpg
|
name: cnpg
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ spec:
|
|||||||
chart:
|
chart:
|
||||||
spec:
|
spec:
|
||||||
chart: k8up
|
chart: k8up
|
||||||
version: 4.9.0
|
version: 4.8.6
|
||||||
sourceRef:
|
sourceRef:
|
||||||
kind: HelmRepository
|
kind: HelmRepository
|
||||||
name: k8up-io
|
name: k8up-io
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ spec:
|
|||||||
chart:
|
chart:
|
||||||
spec:
|
spec:
|
||||||
chart: ingress-nginx
|
chart: ingress-nginx
|
||||||
version: 4.15.1
|
version: 4.15.0
|
||||||
sourceRef:
|
sourceRef:
|
||||||
kind: HelmRepository
|
kind: HelmRepository
|
||||||
name: ingress-nginx
|
name: ingress-nginx
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ spec:
|
|||||||
chart:
|
chart:
|
||||||
spec:
|
spec:
|
||||||
chart: openbao
|
chart: openbao
|
||||||
version: 0.26.2
|
version: 0.25.7
|
||||||
sourceRef:
|
sourceRef:
|
||||||
kind: HelmRepository
|
kind: HelmRepository
|
||||||
name: openbao
|
name: openbao
|
||||||
|
|||||||
@@ -25,4 +25,3 @@ resources:
|
|||||||
|
|
||||||
- configs/openbao-volume.yaml
|
- configs/openbao-volume.yaml
|
||||||
- controllers/openbao.yaml
|
- controllers/openbao.yaml
|
||||||
- configs/openbao-k8s-se-role.yaml
|
|
||||||
|
|||||||
16
monke/gpt-researcher.yaml
Normal file
16
monke/gpt-researcher.yaml
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Secret
|
||||||
|
metadata:
|
||||||
|
name: tavily
|
||||||
|
namespace: gpt-researcher
|
||||||
|
stringData:
|
||||||
|
TAVILY_API_KEY: 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
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Secret
|
||||||
|
metadata:
|
||||||
|
name: openrouter
|
||||||
|
namespace: gpt-researcher
|
||||||
|
stringData:
|
||||||
|
OPENROUTER_API_KEY: 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
|
||||||
@@ -2,7 +2,6 @@
|
|||||||
|
|
||||||
import argparse
|
import argparse
|
||||||
import os
|
import os
|
||||||
import pathlib
|
|
||||||
from typing import Any, cast
|
from typing import Any, cast
|
||||||
|
|
||||||
import hvac
|
import hvac
|
||||||
@@ -43,7 +42,7 @@ def synchronize_auth_kubernetes_config(client: hvac.Client):
|
|||||||
def synchronize_kubernetes_roles(client: hvac.Client):
|
def synchronize_kubernetes_roles(client: hvac.Client):
|
||||||
kubernetes = Kubernetes(client.adapter)
|
kubernetes = Kubernetes(client.adapter)
|
||||||
|
|
||||||
policy_dir = os.path.join(os.path.dirname(__file__), '../vault/kubernetes-auth-roles/')
|
policy_dir = os.path.join(os.path.dirname(__file__), '../vault/kubernetes-roles/')
|
||||||
|
|
||||||
roles: dict[str, Any] = {} # pyright:ignore[reportExplicitAny]
|
roles: dict[str, Any] = {} # pyright:ignore[reportExplicitAny]
|
||||||
for filename in os.listdir(policy_dir):
|
for filename in os.listdir(policy_dir):
|
||||||
@@ -68,69 +67,6 @@ def synchronize_kubernetes_roles(client: hvac.Client):
|
|||||||
# Using write data instead of kubernetes.create_role, we can pass raw yaml
|
# Using write data instead of kubernetes.create_role, we can pass raw yaml
|
||||||
_ = client.write_data(f'/auth/kubernetes/role/{role_name}', data=role_content) # pyright:ignore[reportAny]
|
_ = client.write_data(f'/auth/kubernetes/role/{role_name}', data=role_content) # pyright:ignore[reportAny]
|
||||||
|
|
||||||
def synchronize_approle_auth(client: hvac.Client):
|
|
||||||
if client.sys.list_auth_methods().get('approle/') is None:
|
|
||||||
print('Enabling AppRole auth method')
|
|
||||||
client.sys.enable_auth_method('approle', 'AppRole authorization for CI')
|
|
||||||
|
|
||||||
roles_dir = pathlib.Path(__file__).parent.joinpath('../vault/approles/')
|
|
||||||
roles: dict[str, Any] = {}
|
|
||||||
|
|
||||||
for filename in roles_dir.iterdir():
|
|
||||||
with filename.open('r') as f:
|
|
||||||
role = yaml.safe_load(f.read())
|
|
||||||
assert type(role) is dict
|
|
||||||
roles[filename.stem] = role
|
|
||||||
|
|
||||||
roles_on_vault: list[str] = []
|
|
||||||
roles_response = client.list("auth/approle/roles")
|
|
||||||
if roles_response is not None:
|
|
||||||
roles_on_vault = roles_response['data']['keys']
|
|
||||||
|
|
||||||
for role in roles_on_vault:
|
|
||||||
if role not in roles:
|
|
||||||
print(f'Deleting role: {role}')
|
|
||||||
client.delete(f'auth/approle/role/{role}')
|
|
||||||
|
|
||||||
for role_name, role_content in roles.items():
|
|
||||||
print(f'Updating role: {role_name}')
|
|
||||||
client.write_data(f'auth/approle/role/{role_name}', data=role_content)
|
|
||||||
|
|
||||||
def synchronize_kubernetes_secretengine(client: hvac.Client):
|
|
||||||
# Ensure kubernetes secret engine is enabled
|
|
||||||
if client.sys.list_mounted_secrets_engines().get('kubernetes/') is None:
|
|
||||||
print('Enabling kubernetes secret engine')
|
|
||||||
client.sys.enable_secrets_engine('kubernetes', 'kubernetes', 'Cluster access')
|
|
||||||
|
|
||||||
# Write empty config (all defaults, working on the same cluster)
|
|
||||||
client.write('kubernetes/config', None)
|
|
||||||
|
|
||||||
policy_dir = pathlib.Path(__file__).parent.joinpath('../vault/kubernetes-se-roles/')
|
|
||||||
roles: dict[str, Any] = {}
|
|
||||||
|
|
||||||
for filename in policy_dir.iterdir():
|
|
||||||
with filename.open('r') as f:
|
|
||||||
role = yaml.safe_load(f.read())
|
|
||||||
assert type(role) is dict
|
|
||||||
# generated_role_rules must be json or yaml formatted string, convert it
|
|
||||||
if 'generated_role_rules' in role and type(role['generated_role_rules']) is not str:
|
|
||||||
role['generated_role_rules'] = yaml.safe_dump(role['generated_role_rules'])
|
|
||||||
roles[filename.stem] = role
|
|
||||||
|
|
||||||
roles_on_vault: list[str] = []
|
|
||||||
roles_response = client.list("kubernetes/roles")
|
|
||||||
if roles_response is not None:
|
|
||||||
roles_on_vault = roles_response['data']['keys']
|
|
||||||
|
|
||||||
for role in roles_on_vault:
|
|
||||||
if role not in roles:
|
|
||||||
print(f'Deleting role: {role}')
|
|
||||||
client.delete(f'kubernetes/roles/{role}')
|
|
||||||
|
|
||||||
for role_name, role_content in roles.items():
|
|
||||||
print(f'Updating role: {role_name}')
|
|
||||||
client.write_data(f'kubernetes/roles/{role_name}', data=role_content)
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
parser = argparse.ArgumentParser(
|
parser = argparse.ArgumentParser(
|
||||||
prog="synchronizeVault",
|
prog="synchronizeVault",
|
||||||
@@ -146,11 +82,5 @@ if __name__ == '__main__':
|
|||||||
print('Synchronizing kubernetes config')
|
print('Synchronizing kubernetes config')
|
||||||
synchronize_auth_kubernetes_config(client)
|
synchronize_auth_kubernetes_config(client)
|
||||||
|
|
||||||
print('Synchronizing kubernetes auth roles')
|
print('Synchronizing kubernetes roles')
|
||||||
synchronize_kubernetes_roles(client)
|
synchronize_kubernetes_roles(client)
|
||||||
|
|
||||||
print('Synchronizing AppRole auth method')
|
|
||||||
synchronize_approle_auth(client)
|
|
||||||
|
|
||||||
print('Synchronizing kubernetes secret engine')
|
|
||||||
synchronize_kubernetes_secretengine(client)
|
|
||||||
|
|||||||
@@ -1,4 +0,0 @@
|
|||||||
token_ttl: 20m
|
|
||||||
token_max_ttl: 20m
|
|
||||||
policies:
|
|
||||||
- flux-reconcile
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
bound_service_account_names:
|
|
||||||
- authentik-secret
|
|
||||||
bound_service_account_namespaces:
|
|
||||||
- authentik
|
|
||||||
token_policies:
|
|
||||||
- authentik
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
bound_service_account_names:
|
|
||||||
- crawl4ai-secret
|
|
||||||
bound_service_account_namespaces:
|
|
||||||
- crawl4ai
|
|
||||||
token_policies:
|
|
||||||
- crawl4ai
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
bound_service_account_names:
|
|
||||||
- openwebui-secret
|
|
||||||
bound_service_account_namespaces:
|
|
||||||
- openwebui
|
|
||||||
token_policies:
|
|
||||||
- openwebui
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
bound_service_account_names:
|
|
||||||
- woodpecker-secret
|
|
||||||
bound_service_account_namespaces:
|
|
||||||
- woodpecker
|
|
||||||
token_policies:
|
|
||||||
- woodpecker
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
allowed_kubernetes_namespaces: flux-system
|
|
||||||
generated_role_rules:
|
|
||||||
rules:
|
|
||||||
- apiGroups: ["source.toolkit.fluxcd.io"]
|
|
||||||
resources: ["gitrepositories"]
|
|
||||||
verbs: ["get", "patch", "watch"]
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
path "secret/data/authentik" {
|
|
||||||
capabilities = ["read"]
|
|
||||||
}
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
path "secret/data/crawl4ai" {
|
|
||||||
capabilities = ["read"]
|
|
||||||
}
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
path "kubernetes/creds/flux-reconcile" {
|
|
||||||
capabilities = ["update"]
|
|
||||||
}
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
path "secret/data/authentik/openwebui" {
|
|
||||||
capabilities = ["read"]
|
|
||||||
}
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
path "secret/data/woodpecker" {
|
|
||||||
capabilities = ["read"]
|
|
||||||
}
|
|
||||||
|
|
||||||
path "secret/data/container-registry" {
|
|
||||||
capabilities = ["read"]
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user