feat(atuin): Move to separate k8s namespace

This commit is contained in:
Pim Kunis 2024-07-14 14:14:08 +02:00
parent e4b7b69bbb
commit 3fcbbfa8c2
6 changed files with 78 additions and 65 deletions

View file

@ -56,6 +56,7 @@ Currently, the applications being deployed like this are:
- `freshrss`
- `radicale`
- `kms`
- `atuin`
## Known bugs

View file

@ -72,4 +72,6 @@
"${self}/kubenix-modules/radicale.nix" "radicale" "radicale";
kubenix.kms = mkDeployScriptAndManifest
"${self}/kubenix-modules/kms.nix" "kms" "kms";
kubenix.atuin = mkDeployScriptAndManifest
"${self}/kubenix-modules/atuin.nix" "atuin" "atuin";
})

View file

@ -13,7 +13,6 @@ let
./dnsmasq.nix
./blog.nix
./attic.nix
./atuin.nix
./immich.nix
# ./argo.nix
# ./minecraft.nix

View file

@ -1,14 +1,11 @@
{
kubernetes.resources = {
secrets.atuin.stringData = {
secrets.database.stringData = {
databasePassword = "ref+sops://secrets/kubernetes.yaml#/atuin/databasePassword";
databaseURL = "ref+sops://secrets/kubernetes.yaml#/atuin/databaseURL";
};
deployments.atuin = {
metadata.labels.app = "atuin";
spec = {
deployments.server.spec = {
selector.matchLabels.app = "atuin";
strategy = {
@ -25,8 +22,8 @@
spec = {
volumes = {
data.persistentVolumeClaim.claimName = "atuin";
db.persistentVolumeClaim.claimName = "atuin-db";
data.persistentVolumeClaim.claimName = "data";
database.persistentVolumeClaim.claimName = "database";
};
containers = {
@ -42,7 +39,7 @@
ATUIN_OPEN_REGISTRATION.value = "false";
ATUIN_DB_URI.valueFrom.secretKeyRef = {
name = "atuin";
name = "database";
key = "databaseURL";
};
};
@ -62,13 +59,13 @@
POSTGRES_USER.value = "atuin";
POSTGRES_PASSWORD.valueFrom.secretKeyRef = {
name = "atuin";
name = "database";
key = "databasePassword";
};
};
volumeMounts = [{
name = "db";
name = "database";
mountPath = "/var/lib/postgresql/data";
}];
};
@ -76,9 +73,8 @@
};
};
};
};
services.atuin.spec = {
services.server.spec = {
selector.app = "atuin";
ports.web = {
@ -88,12 +84,26 @@
};
};
lab.ingresses.atuin = {
lab = {
ingresses.server = {
host = "atuin.kun.is";
service = {
name = "atuin";
name = "server";
portName = "web";
};
};
longhorn.persistentVolumeClaim = {
data = {
volumeName = "atuin";
storage = "300Mi";
};
database = {
volumeName = "atuin-db";
storage = "300Mi";
};
};
};
}

View file

@ -65,6 +65,7 @@
freshrss = { };
radicale = { };
kms = { };
atuin = { };
};
nodes =

View file

@ -36,8 +36,6 @@
bazarr.storage = "25Mi";
attic.storage = "15Gi";
attic-db.storage = "150Mi";
atuin.storage = "300Mi";
atuin-db.storage = "300Mi";
immich.storage = "50Gi";
immich-db.storage = "5Gi";
};
@ -45,6 +43,8 @@
longhorn.persistentVolume = {
freshrss.storage = "1Gi";
radicale.storage = "200Mi";
atuin.storage = "300Mi";
atuin-db.storage = "300Mi";
};
nfsVolumes = {