Replace dnsmasq deployment with NixNG image

This commit is contained in:
Pim Kunis 2024-09-17 13:22:02 +02:00
parent 0cc17722cb
commit 22a2d7c8b1
2 changed files with 9 additions and 33 deletions

View file

@ -3,44 +3,20 @@
config = lib.mkIf config.dnsmasq.enable {
kubernetes.resources = {
configMaps.dnsmasq-config.data.config = ''
address=/kms.kun.is/${globals.kmsIPv4}
address=/ssh.git.kun.is/${globals.gitIPv4}
alias=${globals.routerPublicIPv4},${globals.traefikIPv4}
expand-hosts
host-record=hermes.dmz,${globals.dnsmasqIPv4}
local=/dmz/
log-queries
no-hosts
no-resolv
port=53
server=192.168.30.1
server=/kun.is/${globals.bind9IPv4}
'';
deployments.dnsmasq.spec = {
selector.matchLabels.app = "dnsmasq";
template = {
metadata.labels.app = "dnsmasq";
spec = {
containers.dnsmasq = {
image = globals.images.dnsmasq;
spec.containers.dnsmasq = {
image = "nix:0/root/dnsmasq.tar";
imagePullPolicy = "Always";
ports.dns = {
containerPort = 53;
protocol = "UDP";
};
volumeMounts = [{
name = "config";
mountPath = "/etc/dnsmasq.conf";
subPath = "config";
}];
ports.dns = {
containerPort = 53;
protocol = "UDP";
};
volumes.config.configMap.name = "dnsmasq-config";
};
};
};