feat(dnsmasq): Move to dns k8s namespace

refactor(pihole): Move to dns k8s namespace
This commit is contained in:
Pim Kunis 2024-07-17 10:25:23 +02:00
parent e9307da90d
commit 342ba2baeb
6 changed files with 29 additions and 32 deletions

View file

@ -68,6 +68,7 @@ Currently, the applications being deployed like this are:
- `immich`
- `attic`
- `inbucket`
- `dnsmasq`
## Known bugs

View file

@ -89,11 +89,13 @@
kubenix.syncthing = mkDeployScriptAndManifest
"${self}/kubenix-modules/syncthing.nix" "syncthing" "syncthing";
kubenix.pihole = mkDeployScriptAndManifest
"${self}/kubenix-modules/pihole.nix" "pihole" "pihole";
"${self}/kubenix-modules/pihole.nix" "pihole" "dns";
kubenix.immich = mkDeployScriptAndManifest
"${self}/kubenix-modules/immich.nix" "immich" "immich";
kubenix.attic = mkDeployScriptAndManifest
"${self}/kubenix-modules/attic.nix" "attic" "attic";
kubenix.inbucket = mkDeployScriptAndManifest
"${self}/kubenix-modules/inbucket.nix" "inbucket" "inbucket";
kubenix.dnsmasq = mkDeployScriptAndManifest
"${self}/kubenix-modules/dnsmasq.nix" "dnsmasq" "dns";
})

View file

@ -2,7 +2,6 @@ let
applications = [
./media.nix
./bind9
./dnsmasq.nix
# ./argo.nix
# ./minecraft.nix
];

View file

@ -72,10 +72,10 @@
forgejo = { };
paperless = { };
syncthing = { };
pihole = { };
immich = { };
attic = { };
inbucket = { };
dns = { };
};
nodes =

View file

@ -1,6 +1,5 @@
{ myLib, ... }: {
kubernetes.resources = {
# TODO: generate this with nix?
configMaps.dnsmasq-config.data.config = ''
address=/kms.kun.is/${myLib.globals.kmsIPv4}
address=/ssh.git.kun.is/${myLib.globals.gitIPv4}
@ -16,10 +15,7 @@
server=/kun.is/${myLib.globals.bind9IPv4}
'';
deployments.dnsmasq = {
metadata.labels.app = "dnsmasq";
spec = {
deployments.dnsmasq.spec = {
selector.matchLabels.app = "dnsmasq";
template = {
@ -45,7 +41,6 @@
};
};
};
};
services.dnsmasq.spec = {
type = "LoadBalancer";

View file

@ -44,8 +44,8 @@
};
volumes = {
data.persistentVolumeClaim.claimName = "data";
dnsmasq.persistentVolumeClaim.claimName = "dnsmasq";
data.persistentVolumeClaim.claimName = "pihole-data";
dnsmasq.persistentVolumeClaim.claimName = "pihole-dnsmasq";
};
securityContext = {
@ -57,7 +57,7 @@
};
services = {
web.spec = {
pihole-web.spec = {
selector.app = "pihole";
ports.web = {
@ -66,7 +66,7 @@
};
};
dns.spec = {
pihole-dns.spec = {
type = "LoadBalancer";
loadBalancerIP = myLib.globals.piholeIPv4;
selector.app = "pihole";
@ -86,18 +86,18 @@
entrypoint = "localsecure";
service = {
name = "web";
name = "pihole-web";
portName = "web";
};
};
longhorn.persistentVolumeClaim = {
data = {
pihole-data = {
volumeName = "pihole-data";
storage = "750Mi";
};
dnsmasq = {
pihole-dnsmasq = {
volumeName = "pihole-dnsmasq";
storage = "16Mi";
};