remove kubernetes related stuff

This commit is contained in:
Pim Kunis 2024-02-11 14:52:45 +01:00
parent 03e816ff21
commit 891d64a698
6 changed files with 0 additions and 120 deletions

View file

@ -125,26 +125,4 @@
};
};
};
k3s = {
type = "virtual";
hypervisorName = "atlas";
nixosModule = {
microvm.balloonMem = 7680;
lab = {
k3s.enable = true;
vm = {
id = 4;
shares = [{
name = "k3s";
mountPoint = "/var/lib/rancher/k3s";
}];
};
};
};
};
}

View file

@ -2,7 +2,6 @@
imports = [
./storage.nix
./ssh-certificates.nix
./k3s
./backups.nix
./networking
./data-sharing.nix

View file

@ -1,16 +0,0 @@
{ kubenix, ... }: {
imports = [ kubenix.modules.k8s ];
kubernetes.resources.clusterRoleBindings.pim-cluster-admin = {
roleRef = {
apiGroup = "rbac.authorization.k8s.io";
kind = "ClusterRole";
name = "cluster-admin";
};
subjects = [
{
kind = "User";
name = "pim";
}
];
};
}

View file

@ -1,36 +0,0 @@
{ pkgs, lib, config, kubenix, ... }:
let cfg = config.lab.k3s;
in {
options.lab.k3s.enable = lib.mkOption {
default = false;
type = lib.types.bool;
description = ''
Whether to start k3s with custom configuration.
'';
};
config = lib.mkIf cfg.enable {
environment.systemPackages = with pkgs; [ k3s ];
networking = {
nftables.enable = lib.mkForce false;
firewall.enable = lib.mkForce false;
};
services.k3s = {
enable = true;
role = "server";
extraFlags = "--tls-san ${config.networking.fqdn} --snapshotter native";
};
system.activationScripts.k3s-bootstrap.text =
let
k3sBootstrapFile = (kubenix.evalModules.x86_64-linux {
module = import ./bootstrap.nix;
}).config.kubernetes.result;
in
''
ln -sf ${k3sBootstrapFile} /var/lib/rancher/k3s/server/manifests/k3s-bootstrap.json
'';
};
}