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"; "${self}/kubenix-modules/cyberchef.nix" "cyberchef" "cyberchef";
kubenix.freshrss = mkDeployScriptAndManifest kubenix.freshrss = mkDeployScriptAndManifest
"${self}/kubenix-modules/freshrss.nix" "freshrss" "freshrss"; "${self}/kubenix-modules/freshrss.nix" "freshrss" "freshrss";
kubenix.radicale = mkDeployScriptAndManifest
"${self}/kubenix-modules/radicale.nix" "radicale" "radicale";
}) })

View file

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

View file

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

View file

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

View file

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

View file

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