nixos-servers/kubenix-modules/freshrss.nix

85 lines
1.8 KiB
Nix
Raw Normal View History

{
2024-03-26 19:26:02 +00:00
kubernetes.resources = {
secrets.server.stringData.adminPassword = "ref+sops://secrets/kubernetes.yaml#/freshrss/password";
2024-03-26 19:26:02 +00:00
deployments.server.spec = {
selector.matchLabels.app = "freshrss";
2024-03-26 19:26:02 +00:00
strategy = {
type = "RollingUpdate";
2024-03-26 19:26:02 +00:00
rollingUpdate = {
maxSurge = 0;
maxUnavailable = 1;
};
};
template = {
metadata.labels.app = "freshrss";
spec = {
containers.freshrss = {
image = "freshrss/freshrss:1.24.1";
imagePullPolicy = "Always";
ports.web.containerPort = 80;
env = {
TZ.value = "Europe/Amsterdam";
CRON_MIN.value = "2,32";
ADMIN_EMAIL.value = "pim@kunis.nl";
PUBLISHED_PORT.value = "443";
ADMIN_PASSWORD.valueFrom.secretKeyRef = {
name = "server";
key = "adminPassword";
2024-04-14 19:00:15 +00:00
};
2024-03-26 19:26:02 +00:00
ADMIN_API_PASSWORD.valueFrom.secretKeyRef = {
name = "server";
key = "adminPassword";
};
2024-03-26 19:26:02 +00:00
};
2024-05-20 17:33:50 +00:00
volumeMounts = [{
name = "data";
mountPath = "/var/www/FreshRSS/data";
}];
};
2024-05-20 17:33:50 +00:00
volumes.data.persistentVolumeClaim.claimName = "data";
securityContext = {
fsGroup = 33;
fsGroupChangePolicy = "OnRootMismatch";
2024-03-26 19:26:02 +00:00
};
};
};
};
services.server.spec = {
2024-03-26 19:26:02 +00:00
selector.app = "freshrss";
2024-04-14 19:43:31 +00:00
ports.web = {
2024-03-26 19:26:02 +00:00
port = 80;
2024-04-14 19:43:31 +00:00
targetPort = "web";
};
2024-03-26 19:26:02 +00:00
};
};
2024-03-26 19:26:02 +00:00
lab = {
ingresses.web = {
host = "rss.kun.is";
service = {
name = "web";
portName = "web";
};
2024-03-26 19:26:02 +00:00
};
longhorn.persistentVolumeClaim.data = {
volumeName = "freshrss";
storage = "1Gi";
};
2024-03-26 19:26:02 +00:00
};
}