Deploy vrchat-prometheus-adapter to cluster
All checks were successful
Lint / lint (push) Successful in 21s
All checks were successful
Lint / lint (push) Successful in 21s
This commit is contained in:
parent
d21c8fac35
commit
be3c76801e
|
@ -1,5 +1,6 @@
|
|||
{ lib, config, kubenix, ... }: {
|
||||
imports = [ kubenix.modules.k8s
|
||||
(import ./custom.nix)
|
||||
(import ./tclip.nix) ];
|
||||
(import ./tclip.nix)
|
||||
(import ./vrchat-prometheus-exporter.nix) ];
|
||||
}
|
||||
|
|
56
homelab/vrchat-prometheus-exporter.nix
Normal file
56
homelab/vrchat-prometheus-exporter.nix
Normal file
|
@ -0,0 +1,56 @@
|
|||
let
|
||||
appName = "vrchat-prometheus-exporter";
|
||||
appImage = "git.gmem.ca/arch/vrchat-prometheus-adapter:arm";
|
||||
in
|
||||
{
|
||||
kubernetes.resources."monitoring.coreos.com"."v1".ServiceMonitor.vrchat-prometheus-adapter = {
|
||||
spec = {
|
||||
selector.matchLabels.app = appName;
|
||||
endpoints = [ { port = "metrics"; interval = "60s"; } ];
|
||||
};
|
||||
};
|
||||
kubernetes.resources.services.vrchat-prometheus-adapter = {
|
||||
metadata.annotations = {
|
||||
"prometheus.io/port" = "6534";
|
||||
"prometheus.io/scrape" = "true";
|
||||
"prometheus.io/path" = "/metrics";
|
||||
};
|
||||
spec = {
|
||||
selector.app = appName;
|
||||
ports.metrics = {
|
||||
port = 6534;
|
||||
targetPort = 6534;
|
||||
};
|
||||
};
|
||||
};
|
||||
kubernetes.resources.deployments.vrchat-prometheus-adapter.spec = {
|
||||
selector.matchLabels.app = appName;
|
||||
template = {
|
||||
metadata.labels.app = appName;
|
||||
spec = {
|
||||
volumes = {
|
||||
config.configMap.name = "vrchat-prometheus-adapter";
|
||||
};
|
||||
containers = {
|
||||
vrchat-prometheus-adapter = {
|
||||
image = appImage;
|
||||
imagePullPolicy = "Always";
|
||||
volumeMounts = [ { name = "config"; mountPath = "/config.toml"; subPath = "config.toml"; } ];
|
||||
envFrom = [ { secretRef.name = "vrchat-prometheus-adapter"; } ];
|
||||
ports.metrics.containerPort = 6534;
|
||||
resources = {
|
||||
requests = {
|
||||
cpu = "50m";
|
||||
memory = "32Mi";
|
||||
};
|
||||
limits = {
|
||||
cpu = "500m";
|
||||
memory = "256Mi";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue