Remove k3s, add podinfo to flux, begin registry
This commit is contained in:
parent
bb0ce80ae4
commit
e5768b877d
12
flux/cluster/base/podinfo-source.yaml
Normal file
12
flux/cluster/base/podinfo-source.yaml
Normal 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
|
||||||
|
|
|
@ -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 = {
|
||||||
|
|
|
@ -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
|
|
||||||
];
|
|
||||||
};
|
|
||||||
}
|
|
10
nixos/machines/registry/default.nix
Normal file
10
nixos/machines/registry/default.nix
Normal 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";
|
||||||
|
|
||||||
|
};
|
||||||
|
}
|
Loading…
Reference in a new issue