Remove k3s, add podinfo to flux, begin registry

This commit is contained in:
Julius 2022-05-21 23:50:30 +02:00
parent bb0ce80ae4
commit e5768b877d
Signed by: j00lz
GPG key ID: AF241B0AA237BBA2
4 changed files with 30 additions and 38 deletions

View file

@ -0,0 +1,12 @@
---
apiVersion: source.toolkit.fluxcd.io/v1beta2
kind: GitRepository
metadata:
name: podinfo
namespace: flux-system
spec:
interval: 30s
ref:
branch: master
url: https://github.com/stefanprodan/podinfo

View file

@ -100,14 +100,6 @@
}; };
}; };
k3s = {
imports = [ ./machines/k3s ];
deployment = {
targetHost = "k3s.lxd";
tags = [ "system" ];
};
};
minio = { minio = {
imports = [ ./machines/minio ]; imports = [ ./machines/minio ];
deployment = { deployment = {
@ -122,6 +114,14 @@
}; };
}; };
registry = {
imports = [ ./machines/registry ];
deployment = {
targetHost = "registry.lxd";
tags = [ "system" ];
};
};
# k3s = { # k3s = {
# imports = [ ./machines/k3s ]; # imports = [ ./machines/k3s ];
# deployment = { # deployment = {

View file

@ -1,30 +0,0 @@
{ config, pkgs, lib, ... }: {
imports = [ ../../common ../../common/lxc.nix ];
networking.hostName = "k3s";
system.stateVersion = "21.11";
# Additional packages
environment.systemPackages = with pkgs; [ iptables vim ];
# Disable the firewall as we need all the ports
networking.firewall.enable = false;
# Force-enable Cgroupv2
systemd.enableUnifiedCgroupHierarchy = lib.mkForce true;
# Ensure `mount` and `grep` are available
systemd.services.k3s.path = [ pkgs.gnugrep pkgs.utillinux ];
# Enable k3s as a master node
services.k3s = {
enable = true;
role = "server";
extraFlags = builtins.toString [
"--data-dir=/var/lib/k3s" # Set data dir to var lib
"--cluster-init" # Enable embedded etcd
"--cluster-cidr=10.69.0.0/16" # the default of 10.42.0.0/16 clashes with my own network
"--tls-san asraphiel.dev" # Set the SAN to the hostname
];
};
}

View file

@ -0,0 +1,10 @@
{ config, pkgs, deployment, ... }: {
imports = [ ../../common ../../common/lxc.nix ];
networking.hostName = "registry";
system.stateVersion = "21.11";
deployment.keys."wahaha" = {
text = "wahaha";
};
}