nixos-servers/kubenix-modules/freshrss.nix
2024-04-30 13:48:20 +02:00

74 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 = {
volumes.data.persistentVolumeClaim.claimName = "freshrss";
containers.freshrss = {
# TODO: pin this to a release when a new one is released.
image = "freshrss/freshrss:edge";
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";
}];
};
};
};
};
};
services.freshrss.spec = {
selector.app = "freshrss";
ports.web = {
port = 80;
targetPort = "web";
};
};
};
lab = {
nfsVolumes.freshrss.path = "freshrss/data";
ingresses.freshrss = {
host = "rss.kun.is";
service = {
name = "freshrss";
portName = "web";
};
};
};
}