nixos-servers/kubenix-modules/freshrss.nix
2024-05-26 15:56:08 +02:00

76 lines
1.7 KiB
Nix

{
kubernetes.resources = {
configMaps.freshrss.data = {
TZ = "Europe/Amsterdam";
CRON_MIN = "2,32";
ADMIN_EMAIL = "pim@kunis.nl";
PUBLISHED_PORT = "443";
};
secrets.freshrss.stringData.adminPassword = "ref+sops://secrets/sops.yaml#/freshrss/password";
deployments.freshrss = {
metadata.labels.app = "freshrss";
spec = {
selector.matchLabels.app = "freshrss";
template = {
metadata.labels.app = "freshrss";
spec = {
containers.freshrss = {
image = "freshrss/freshrss:1.24.0";
envFrom = [{ configMapRef.name = "freshrss"; }];
ports.web.containerPort = 80;
env = {
ADMIN_PASSWORD.valueFrom.secretKeyRef = {
name = "freshrss";
key = "adminPassword";
};
ADMIN_API_PASSWORD.valueFrom.secretKeyRef = {
name = "freshrss";
key = "adminPassword";
};
};
volumeMounts = [{
name = "data";
mountPath = "/var/www/FreshRSS/data";
}];
};
volumes.data.persistentVolumeClaim.claimName = "freshrss";
securityContext = {
fsGroup = 33;
fsGroupChangePolicy = "OnRootMismatch";
};
};
};
};
};
services.freshrss.spec = {
selector.app = "freshrss";
ports.web = {
port = 80;
targetPort = "web";
};
};
};
lab = {
ingresses.freshrss = {
host = "rss.kun.is";
service = {
name = "freshrss";
portName = "web";
};
};
};
}