2024-04-13 21:25:48 +00:00
|
|
|
{ myLib, ... }: {
|
2024-04-11 21:17:01 +00:00
|
|
|
kubernetes.resources = {
|
|
|
|
configMaps.dnsmasq-config.data.config = ''
|
2024-04-13 21:25:48 +00:00
|
|
|
address=/kms.kun.is/${myLib.globals.kmsIPv4}
|
|
|
|
address=/ssh.git.kun.is/${myLib.globals.gitIPv4}
|
|
|
|
alias=${myLib.globals.routerPublicIPv4},${myLib.globals.traefikIPv4}
|
2024-04-11 21:17:01 +00:00
|
|
|
expand-hosts
|
2024-04-13 21:25:48 +00:00
|
|
|
host-record=hermes.dmz,${myLib.globals.dnsmasqIPv4}
|
2024-04-11 21:17:01 +00:00
|
|
|
local=/dmz/
|
|
|
|
log-queries
|
|
|
|
no-hosts
|
|
|
|
no-resolv
|
|
|
|
port=53
|
|
|
|
server=192.168.30.1
|
2024-04-13 21:25:48 +00:00
|
|
|
server=/kun.is/${myLib.globals.bind9IPv4}
|
2024-04-11 21:17:01 +00:00
|
|
|
'';
|
|
|
|
|
2024-07-17 08:25:23 +00:00
|
|
|
deployments.dnsmasq.spec = {
|
|
|
|
selector.matchLabels.app = "dnsmasq";
|
2024-04-11 21:17:01 +00:00
|
|
|
|
2024-07-17 08:25:23 +00:00
|
|
|
template = {
|
|
|
|
metadata.labels.app = "dnsmasq";
|
2024-04-11 21:17:01 +00:00
|
|
|
|
2024-07-17 08:25:23 +00:00
|
|
|
spec = {
|
|
|
|
containers.dnsmasq = {
|
|
|
|
image = "dockurr/dnsmasq:2.90";
|
2024-04-11 21:17:01 +00:00
|
|
|
|
2024-07-17 08:25:23 +00:00
|
|
|
ports.dns = {
|
|
|
|
containerPort = 53;
|
|
|
|
protocol = "UDP";
|
2024-04-11 21:17:01 +00:00
|
|
|
};
|
|
|
|
|
2024-07-17 08:25:23 +00:00
|
|
|
volumeMounts = [{
|
|
|
|
name = "config";
|
|
|
|
mountPath = "/etc/dnsmasq.conf";
|
|
|
|
subPath = "config";
|
|
|
|
}];
|
2024-04-11 21:17:01 +00:00
|
|
|
};
|
2024-07-17 08:25:23 +00:00
|
|
|
|
|
|
|
volumes.config.configMap.name = "dnsmasq-config";
|
2024-04-11 21:17:01 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
services.dnsmasq.spec = {
|
|
|
|
type = "LoadBalancer";
|
2024-04-13 21:25:48 +00:00
|
|
|
loadBalancerIP = myLib.globals.dnsmasqIPv4;
|
2024-04-11 21:17:01 +00:00
|
|
|
selector.app = "dnsmasq";
|
|
|
|
|
2024-04-14 19:43:31 +00:00
|
|
|
ports.dns = {
|
2024-04-11 21:17:01 +00:00
|
|
|
port = 53;
|
2024-04-14 19:43:31 +00:00
|
|
|
targetPort = "dns";
|
2024-04-11 21:17:01 +00:00
|
|
|
protocol = "UDP";
|
2024-04-14 19:43:31 +00:00
|
|
|
};
|
2024-04-11 21:17:01 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|