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 = {
kind = "Deployment";
replicas = 1;
extraVolumes = [
{
name = "data";
persistentVolumeClaim.claimName = "data";
}
];
extraVolumeMounts = [
{
name = "data";
mountPath = "/storage";
}
];
};
secret.additionalSecrets.authelia.items = [
@ -58,7 +72,7 @@
local = {
enabled = true;
path = "/tmp/storage"; # TODO
path = "/storage/database.sqlite";
};
};
@ -78,19 +92,31 @@
notifier.filesystem = {
enabled = true;
# TODO: switch to SMTP
filename = "/tmp/notifications.txt";
};
};
};
};
resources.secrets.authelia.stringData = {
resources = {
deployments.authelia.spec = {
strategy = {
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";
};
};
};
lab = {
ingresses.authelia = {