Add persistent data for Authelia

This commit is contained in:
Pim Kunis 2025-02-05 22:24:08 +01:00
parent 20a72b00a6
commit b5fdd14ea6

View file

@ -18,6 +18,20 @@
pod = { pod = {
kind = "Deployment"; kind = "Deployment";
replicas = 1; replicas = 1;
extraVolumes = [
{
name = "data";
persistentVolumeClaim.claimName = "data";
}
];
extraVolumeMounts = [
{
name = "data";
mountPath = "/storage";
}
];
}; };
secret.additionalSecrets.authelia.items = [ secret.additionalSecrets.authelia.items = [
@ -58,7 +72,7 @@
local = { local = {
enabled = true; enabled = true;
path = "/tmp/storage"; # TODO path = "/storage/database.sqlite";
}; };
}; };
@ -78,17 +92,29 @@
notifier.filesystem = { notifier.filesystem = {
enabled = true; enabled = true;
# TODO: switch to SMTP
filename = "/tmp/notifications.txt"; filename = "/tmp/notifications.txt";
}; };
}; };
}; };
}; };
resources.secrets.authelia.stringData = { resources = {
storage = "ref+sops://secrets.yml#/authelia/encryption_keys/storage"; deployments.authelia.spec = {
session = "ref+sops://secrets.yml#/authelia/encryption_keys/session"; strategy = {
users = "ref+sops://secrets.yml#/authelia/users"; type = "RollingUpdate";
rollingUpdate = {
maxSurge = lib.mkForce 0;
maxUnavailable = lib.mkForce 1;
};
};
};
secrets.authelia.stringData = {
storage = "ref+sops://secrets.yml#/authelia/encryption_keys/storage";
session = "ref+sops://secrets.yml#/authelia/encryption_keys/session";
users = "ref+sops://secrets.yml#/authelia/users";
};
}; };
}; };