aboutsummaryrefslogtreecommitdiff
path: root/modules/kubernetes
diff options
context:
space:
mode:
authorMax Audron <audron@cocaine.farm>2023-08-11 16:51:35 +0200
committerMax Audron <audron@cocaine.farm>2023-08-11 16:51:35 +0200
commit40790797e111cec5ff682806998d50c38ed7bca9 (patch)
tree6db95b93f0797a62637845ea4bda5a3eedbc9306 /modules/kubernetes
parentmove nixinate to own flake (diff)
cleanup modules
Diffstat (limited to 'modules/kubernetes')
-rw-r--r--modules/kubernetes/cri-o.nix38
-rw-r--r--modules/kubernetes/default.nix39
2 files changed, 42 insertions, 35 deletions
diff --git a/modules/kubernetes/cri-o.nix b/modules/kubernetes/cri-o.nix
new file mode 100644
index 0000000..cc32b26
--- /dev/null
+++ b/modules/kubernetes/cri-o.nix
@@ -0,0 +1,38 @@
+{ config, lib, pkgs, ... }:
+
+{
+ virtualisation.cri-o = {
+ enable = true;
+ settings = {
+ crio = {
+ network.plugin_dir = "/opt/cni/bin";
+ default_runtime = "crun";
+ runtime = {
+ allowed_devices = [ "/dev/fuse" ];
+ default_sysctls = [
+ "net.ipv4.ping_group_range=0 2147483647"
+ ];
+ workloads = {
+ gitlab = {
+ activation_annotation = "io.kubernetes.cri-o.workload/gitlab";
+ allowed_annotations = [
+ "io.kubernetes.cri-o.userns-mode"
+ "io.kubernetes.cri-o.Devices"
+ "io.kubernetes.cri-o.ShmSize"
+ ];
+ };
+ };
+ runtimes.crun = {
+ runtime_type = "oci";
+ runtime_root = "/run/crun";
+ allowed_annotations = [
+ "io.kubernetes.cri-o.userns-mode"
+ "io.kubernetes.cri-o.Devices"
+ "io.kubernetes.cri-o.ShmSize"
+ ];
+ };
+ };
+ };
+ };
+ };
+}
diff --git a/modules/kubernetes/default.nix b/modules/kubernetes/default.nix
index 1cf1f09..20b766f 100644
--- a/modules/kubernetes/default.nix
+++ b/modules/kubernetes/default.nix
@@ -21,6 +21,10 @@ let
v6 = "${config.wireguard.v6.ula}::${config.wireguard.v6.address}";
};
in {
+ imports = [
+ ./cri-o.nix
+ ];
+
options = {
kubernetes = {
role = mkOption {
@@ -109,40 +113,5 @@ in {
configPath = "/etc/k3s/config.yaml";
disableAgent = cfg.role == "agent";
};
-
- virtualisation.cri-o = {
- enable = true;
- settings = {
- crio = {
- network.plugin_dir = "/opt/cni/bin";
- default_runtime = "crun";
- runtime = {
- allowed_devices = [ "/dev/fuse" ];
- default_sysctls = [
- "net.ipv4.ping_group_range=0 2147483647"
- ];
- workloads = {
- gitlab = {
- activation_annotation = "io.kubernetes.cri-o.workload/gitlab";
- allowed_annotations = [
- "io.kubernetes.cri-o.userns-mode"
- "io.kubernetes.cri-o.Devices"
- "io.kubernetes.cri-o.ShmSize"
- ];
- };
- };
- runtimes.crun = {
- runtime_type = "oci";
- runtime_root = "/run/crun";
- allowed_annotations = [
- "io.kubernetes.cri-o.userns-mode"
- "io.kubernetes.cri-o.Devices"
- "io.kubernetes.cri-o.ShmSize"
- ];
- };
- };
- };
- };
- };
};
}
it/modules/gitlab/default.nix?id=c723f4e0e62aad9d7687b0c9e3e032ed8e98908c&follow=1'>remove gitlab moduleMax Audron-25/+0 2024-02-26update d3fus phone wg pubkeyMarcin Maselko-1/+1 2024-02-26added d3fus nass to wg configMarcin Maselko-0/+9 2024-02-21set minecraft memoryMax Audron-0/+1 2024-02-21add minecraft server and move palworld to games moduleMax Audron-3/+56 2024-02-21set network manually for ns serversMax Audron-0/+51 2024-02-20update nixpkgs-unstableMax Audron-3/+3 2024-02-19update d3fus fritzbox wg portMarcin Maselko-1/+1 2024-02-19add xonotic serverMax Audron-1/+10 'deletions'>-0/+5 2025-07-31update to nixos 25.05Max Audron-113/+65 2025-07-31add more monitoring exporters and scrapersMax Audron-17/+57 2025-07-30try to run authentik nativelyMax Audron-26/+303 2025-07-30more metricsMax Audron-1/+41 2025-07-30enable firewallsMax Audron-1/+39