This commit is contained in:
parent
598c25d4bc
commit
f74e272532
|
@ -23,5 +23,6 @@
|
||||||
(import ./netboot.nix)
|
(import ./netboot.nix)
|
||||||
(import ./nitter.nix)
|
(import ./nitter.nix)
|
||||||
(import ./changedetection.nix)
|
(import ./changedetection.nix)
|
||||||
|
(import ./nextdns-exporter.nix)
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
60
homelab/nextdns-exporter.nix
Normal file
60
homelab/nextdns-exporter.nix
Normal file
|
@ -0,0 +1,60 @@
|
||||||
|
let
|
||||||
|
appName = "nextdns-exporter";
|
||||||
|
nextdns-exporterImage = "ghcr.io/raylas/nextdns-exporter:0.5.3";
|
||||||
|
in {
|
||||||
|
kubernetes.resources."monitoring.coreos.com"."v1".ServiceMonitor.nextdns-exporter = {
|
||||||
|
metadata.labels.app = appName;
|
||||||
|
spec = {
|
||||||
|
selector.matchLabels.app = appName;
|
||||||
|
endpoints = [
|
||||||
|
{
|
||||||
|
port = "metrics";
|
||||||
|
interval = "30s";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
port = "ts-metrics";
|
||||||
|
interval = "30s";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
kubernetes.resources.services.nextdns-exporter-metrics = {
|
||||||
|
metadata.labels.app = appName;
|
||||||
|
spec = {
|
||||||
|
selector.app = appName;
|
||||||
|
ports.metrics = {
|
||||||
|
port = 9948;
|
||||||
|
targetPort = 9948;
|
||||||
|
};
|
||||||
|
ports.ts-metrics = {
|
||||||
|
port = 9949;
|
||||||
|
targetPort = 9949;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
kubernetes.resources.deployments.nextdns-exporter.spec = {
|
||||||
|
selector.matchLabels.app = appName;
|
||||||
|
template = {
|
||||||
|
metadata.labels.app = appName;
|
||||||
|
spec = {
|
||||||
|
containers = {
|
||||||
|
nextdns-exporter = {
|
||||||
|
image = nextdns-exporterImage;
|
||||||
|
imagePullPolicy = "Always";
|
||||||
|
ports.metrics.containerPort = 9948;
|
||||||
|
envFrom = [{secretRef.name = "nextdns-exporter";}];
|
||||||
|
};
|
||||||
|
nextdns-ts-exporter = {
|
||||||
|
image = nextdns-exporterImage;
|
||||||
|
imagePullPolicy = "Always";
|
||||||
|
ports.metrics.containerPort = 9949;
|
||||||
|
env.METRICS_PORT.value = "9949";
|
||||||
|
envFrom = [{secretRef.name = "nextdns-ts-exporter";}];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
Loading…
Reference in a new issue