mirror of
https://github.com/gensokyo-zone/infrastructure.git
synced 2026-02-09 04:19:19 -08:00
ops(k8s): replace k3s with k8s, provide bootstrap, ty @duckfullstop
This commit is contained in:
parent
067d72b8a8
commit
fc67b7a2e5
9 changed files with 266 additions and 47 deletions
|
|
@ -7,7 +7,9 @@
|
|||
}: {
|
||||
imports = with meta; [
|
||||
(modulesPath + "/profiles/qemu-guest.nix")
|
||||
nixos.k3s
|
||||
nixos.sops
|
||||
nixos.cloudflared
|
||||
nixos.k8s
|
||||
];
|
||||
|
||||
boot = {
|
||||
|
|
@ -33,5 +35,26 @@
|
|||
|
||||
networking.interfaces.ens18.useDHCP = true;
|
||||
|
||||
sops.secrets.cloudflare_kubernetes_tunnel = {
|
||||
owner = config.services.cloudflared.user;
|
||||
};
|
||||
|
||||
services.cloudflared = let
|
||||
tunnelId = "3dde2376-1dd1-4282-b5a4-aba272594976";
|
||||
in {
|
||||
tunnels.${tunnelId} = {
|
||||
default = "http_status:404";
|
||||
credentialsFile = config.sops.secrets.cloudflare_kubernetes_tunnel.path;
|
||||
ingress = {
|
||||
"k8s.gensokyo.zone" = {
|
||||
service = "https://localhost:6443";
|
||||
originRequest.noTLSVerify = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
sops.defaultSopsFile = ./secrets.yaml;
|
||||
|
||||
system.stateVersion = "23.11";
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue