feat(radicale): Move to separate k8s namespace

fix(freshrss): Use correct service name
This commit is contained in:
Pim Kunis 2024-07-14 13:48:17 +02:00
parent 6dc3bef386
commit 3223347964
6 changed files with 53 additions and 52 deletions

View file

@ -68,4 +68,6 @@
"${self}/kubenix-modules/cyberchef.nix" "cyberchef" "cyberchef";
kubenix.freshrss = mkDeployScriptAndManifest
"${self}/kubenix-modules/freshrss.nix" "freshrss" "freshrss";
kubenix.radicale = mkDeployScriptAndManifest
"${self}/kubenix-modules/radicale.nix" "radicale" "radicale";
})

View file

@ -1,10 +1,7 @@
let
applications = [
# ./freshrss.nix
# ./cyberchef.nix
./kms.nix
./inbucket.nix
./radicale.nix
./syncthing.nix
./nextcloud.nix
./pihole.nix

View file

@ -63,6 +63,7 @@
namespaces = {
cyberchef = { };
freshrss = { };
radicale = { };
};
nodes =

View file

@ -71,7 +71,7 @@
host = "rss.kun.is";
service = {
name = "web";
name = "server";
portName = "web";
};
};

View file

@ -1,6 +1,6 @@
{ lib, ... }: {
kubernetes.resources = {
configMaps.radicale.data = {
configMaps.server.data = {
users = "pim:$apr1$GUiTihkS$dDCkaUxFx/O86m6NCy/yQ.";
config = lib.generators.toINI { } {
@ -33,63 +33,59 @@
};
};
deployments.radicale = {
metadata.labels.app = "radicale";
deployments.server.spec = {
selector.matchLabels.app = "radicale";
spec = {
selector.matchLabels.app = "radicale";
strategy = {
type = "RollingUpdate";
strategy = {
type = "RollingUpdate";
rollingUpdate = {
maxSurge = 0;
maxUnavailable = 1;
};
rollingUpdate = {
maxSurge = 0;
maxUnavailable = 1;
};
};
template = {
metadata.labels.app = "radicale";
template = {
metadata.labels.app = "radicale";
spec = {
containers.radicale = {
image = "tomsquest/docker-radicale:3.2.2.0";
ports.web.containerPort = 5232;
imagePullPolicy = "Always";
spec = {
containers.radicale = {
image = "tomsquest/docker-radicale:3.2.2.0";
ports.web.containerPort = 5232;
imagePullPolicy = "Always";
volumeMounts = [
{
name = "data";
mountPath = "/data";
}
{
name = "config";
mountPath = "/config/config";
subPath = "config";
}
{
name = "config";
mountPath = "/config/users";
subPath = "users";
}
];
};
volumeMounts = [
{
name = "data";
mountPath = "/data";
}
{
name = "config";
mountPath = "/config/config";
subPath = "config";
}
{
name = "config";
mountPath = "/config/users";
subPath = "users";
}
];
};
volumes = {
data.persistentVolumeClaim.claimName = "radicale";
config.configMap.name = "radicale";
};
volumes = {
data.persistentVolumeClaim.claimName = "data";
config.configMap.name = "server";
};
securityContext = {
fsGroup = 2999;
fsGroupChangePolicy = "OnRootMismatch";
};
securityContext = {
fsGroup = 2999;
fsGroupChangePolicy = "OnRootMismatch";
};
};
};
};
services.radicale.spec = {
services.server.spec = {
selector.app = "radicale";
ports.web = {
@ -100,13 +96,18 @@
};
lab = {
ingresses.radicale = {
ingresses.web = {
host = "dav.kun.is";
service = {
name = "radicale";
name = "server";
portName = "web";
};
};
longhorn.persistentVolumeClaim.data = {
volumeName = "radicale";
storage = "200Mi";
};
};
}

View file

@ -16,7 +16,6 @@
longhornVolumes = {
hedgedoc-uploads.storage = "50Mi";
hedgedoc-db.storage = "100Mi";
radicale.storage = "200Mi";
minecraft.storage = "1Gi";
nextcloud.storage = "50Gi";
nextcloud-db.storage = "400Mi";
@ -45,6 +44,7 @@
longhorn.persistentVolume = {
freshrss.storage = "1Gi";
radicale.storage = "200Mi";
};
nfsVolumes = {