aboutsummaryrefslogtreecommitdiff
path: root/modules/kubernetes/default.nix
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
commit6e1d5200ced185ec7823d65a3877b710b4719130 (patch)
treee31c6c1f9e5675e858b914b66141571f4b611308 /modules/kubernetes/default.nix
parentcleanup phaenn config (diff)
refactor k8s module
Diffstat (limited to 'modules/kubernetes/default.nix')
-rw-r--r--modules/kubernetes/default.nix16
1 files changed, 2 insertions, 14 deletions
diff --git a/modules/kubernetes/default.nix b/modules/kubernetes/default.nix
index 0e6e522..1cf1f09 100644
--- a/modules/kubernetes/default.nix
+++ b/modules/kubernetes/default.nix
@@ -21,10 +21,6 @@ let
v6 = "${config.wireguard.v6.ula}::${config.wireguard.v6.address}";
};
in {
- disabledModules =
- [ "virtualisation/cri-o.nix" "services/cluster/k3s/default.nix" ];
- imports = [ ../cri-o ../k3s ];
-
options = {
kubernetes = {
role = mkOption {
@@ -64,13 +60,6 @@ in {
};
config = {
- nixpkgs.overlays = [
- (self: super: {
- cri-o = super.callPackage ../../pkgs/cri-o { };
- k3s = super.callPackage ../../pkgs/k3s { };
- })
- ];
-
networking.extraHosts = ''
10.10.0.1 ${clusterDomain}
fd15:3d8c:d429:beef::1 ${clusterDomain}
@@ -79,9 +68,6 @@ in {
environment.etc = {
"k3s/config.yaml" = {
text = generators.toJSON { } ({
- # cluster-init = true;
- token = "YPoyiPeBpQpB7oK8";
-
container-runtime-endpoint = "/run/crio/crio.sock";
node-ip = "${internalIP.v4},${internalIP.v6}";
@@ -118,8 +104,10 @@ in {
services.k3s = {
enable = true;
role = cfg.role;
+ token = "YPoyiPeBpQpB7oK8";
serverAddr = "https://10.10.0.1:6443";
configPath = "/etc/k3s/config.yaml";
+ disableAgent = cfg.role == "agent";
};
virtualisation.cri-o = {