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

@ -411,11 +411,11 @@
"poetry2nix": "poetry2nix" "poetry2nix": "poetry2nix"
}, },
"locked": { "locked": {
"lastModified": 1725585190, "lastModified": 1725758289,
"narHash": "sha256-DFpe4CuCzjocTmDcZ6NLK2AiOOd9Orx2kIWCQTFPnNU=", "narHash": "sha256-7Och9QDZx5i7yNJYo/l3z46vYB7c6Hg5/XPyxMGX5mM=",
"owner": "farcaller", "owner": "farcaller",
"repo": "nixhelm", "repo": "nixhelm",
"rev": "a8cb36a16be23d596a91bdf5876d3bd87c945049", "rev": "f5e54a73ff511396e0262f82d34933c8745bda05",
"type": "github" "type": "github"
}, },
"original": { "original": {

View file

@ -3,44 +3,20 @@
config = lib.mkIf config.dnsmasq.enable { config = lib.mkIf config.dnsmasq.enable {
kubernetes.resources = { 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 = { deployments.dnsmasq.spec = {
selector.matchLabels.app = "dnsmasq"; selector.matchLabels.app = "dnsmasq";
template = { template = {
metadata.labels.app = "dnsmasq"; metadata.labels.app = "dnsmasq";
spec = { spec.containers.dnsmasq = {
containers.dnsmasq = { image = "nix:0/root/dnsmasq.tar";
image = globals.images.dnsmasq; imagePullPolicy = "Always";
ports.dns = { ports.dns = {
containerPort = 53; containerPort = 53;
protocol = "UDP"; protocol = "UDP";
};
volumeMounts = [{
name = "config";
mountPath = "/etc/dnsmasq.conf";
subPath = "config";
}];
}; };
volumes.config.configMap.name = "dnsmasq-config";
}; };
}; };
}; };