1
0
Fork 0

Move ingress-nginx to Nix

This commit is contained in:
Gabriel Simmer 2023-11-13 15:15:26 +00:00
parent 09facf51a8
commit ac1b138a9d
Signed by: arch
SSH Key Fingerprint: SHA256:m3OEcdtrnBpMX+2BDGh/byv3hrCekCLzDYMdvGEKPPQ
3 changed files with 29 additions and 18 deletions

View File

@ -1,6 +1,7 @@
{ lib, config, kubenix, ... }: {
imports = [ kubenix.modules.k8s kubenix.modules.helm
(import ./custom.nix)
(import ./nginx.nix)
(import ./tclip.nix)
(import ./vrchat-prometheus-exporter.nix)
(import ./homepage.nix) ];

View File

@ -1,18 +0,0 @@
controller:
kind: DaemonSet
metrics:
enabled: true
serviceMonitor:
enabled: true
additionalLabels:
release: "prometheus"
podAnnotations:
prometheus.io/scrape: "true"
prometheus.io/port: "10254"
ingressClassResource:
default: true
publishService:
enabled: true
service:
externalTrafficPolicy: Local
hostNetwork: true

28
homelab/nginx.nix Normal file
View File

@ -0,0 +1,28 @@
{ lib, config, kubenix, ... }: {
kubernetes.helm.releases.ingress-nginx = {
namespace = "ingress-nginx";
chart = kubenix.lib.helm.fetch {
repo = "https://kubernetes.github.io/ingress-nginx";
chart = "ingress-nginx";
version = "4.8.3";
sha256 = "sha256-zahjdtb4zYtGcft0YYpT5DS+KHhZgpRWg5q+3n8zVsk=";
};
values = {
controller = {
kind = "DaemonSet";
metrics = {
enabled = true;
additionalLabels.release = "prometheus";
};
podAnnotations = {
"prometheus.io/scrape" = "true";
"prometheus.io/port" = "10254";
};
ingressClassResource.default = true;
publishService.enabled = true;
service.externalTrafficPolicy = "Local";
hostNetwork = true;
};
};
};
}