simplify kubenix definitions

This commit is contained in:
Pim Kunis 2024-04-14 21:00:15 +02:00
parent db0303f4d8
commit ec201a038d
12 changed files with 95 additions and 215 deletions

View file

@ -41,10 +41,7 @@
}];
};
volumes = [{
name = "config";
configMap.name = "dnsmasq-config";
}];
volumes.config.configMap.name = "dnsmasq-config";
};
};
};

View file

@ -155,16 +155,10 @@
];
};
volumes = [
{
name = "data";
persistentVolumeClaim.claimName = "forgejo";
}
{
name = "config";
configMap.name = "forgejo-config";
}
];
volumes = {
data.persistentVolumeClaim.claimName = "forgejo";
config.configMap.name = "forgejo-config";
};
};
};
};

View file

@ -19,6 +19,8 @@
metadata.labels.app = "freshrss";
spec = {
volumes.data.persistentVolumeClaim.claimName = "freshrss";
containers.freshrss = {
image = "freshrss/freshrss:edge";
envFrom = [{ configMapRef.name = "freshrss"; }];
@ -28,35 +30,23 @@
protocol = "TCP";
}];
env = [
{
name = "ADMIN_PASSWORD";
env = {
ADMIN_PASSWORD.valueFrom.secretKeyRef = {
name = "freshrss";
key = "adminPassword";
};
valueFrom.secretKeyRef = {
name = "freshrss";
key = "adminPassword";
};
}
{
name = "ADMIN_API_PASSWORD";
valueFrom.secretKeyRef = {
name = "freshrss";
key = "adminPassword";
};
}
];
ADMIN_API_PASSWORD.valueFrom.secretKeyRef = {
name = "freshrss";
key = "adminPassword";
};
};
volumeMounts = [{
name = "data";
mountPath = "/var/www/FreshRSS/data";
}];
};
volumes = [{
name = "data";
persistentVolumeClaim.claimName = "freshrss";
}];
};
};
};

View file

@ -43,24 +43,17 @@
protocol = "TCP";
}];
env = [
{
name = "CMD_DB_URL";
env = {
CMD_DB_URL.valueFrom.secretKeyRef = {
name = "hedgedoc";
key = "databaseURL";
};
valueFrom.secretKeyRef = {
name = "hedgedoc";
key = "databaseURL";
};
}
{
name = "CMD_SESSION_SECRET";
valueFrom.secretKeyRef = {
name = "hedgedoc";
key = "sessionSecret";
};
}
];
CMD_SESSION_SECRET.valueFrom.secretKeyRef = {
name = "hedgedoc";
key = "sessionSecret";
};
};
volumeMounts = [
{
@ -75,16 +68,10 @@
];
};
volumes = [
{
name = "uploads";
persistentVolumeClaim.claimName = "hedgedoc";
}
{
name = "config";
configMap.name = "hedgedoc-config";
}
];
volumes = {
uploads.persistentVolumeClaim.claimName = "hedgedoc";
config.configMap.name = "hedgedoc-config";
};
};
};
};

View file

@ -59,6 +59,8 @@
};
spec = {
volumes.data.persistentVolumeClaim.claimName = "kitchenowl";
containers.kitchenowl-backend = {
image = "tombursch/kitchenowl:v92";
@ -72,11 +74,6 @@
mountPath = "/data";
}];
};
volumes = [{
name = "data";
persistentVolumeClaim.claimName = "kitchenowl";
}];
};
};
};

View file

@ -79,16 +79,10 @@
];
};
volumes = [
{
name = "config";
persistentVolumeClaim.claimName = "jellyfin-config";
}
{
name = "media";
persistentVolumeClaim.claimName = "media";
}
];
volumes = {
config.persistentVolumeClaim.claimName = "jellyfin-config";
media.persistentVolumeClaim.claimName = "media";
};
};
};
};
@ -122,8 +116,6 @@
containerPort = 9091;
protocol = "TCP";
}
# TODO: Only use TCP, as Kubernetes does not support multiple protocols for a port number.
# Should see if this works as correctly though.
{
containerPort = 31780;
protocol = "TCP";
@ -142,16 +134,10 @@
];
};
volumes = [
{
name = "config";
persistentVolumeClaim.claimName = "transmission-config";
}
{
name = "media";
persistentVolumeClaim.claimName = "media";
}
];
volumes = {
config.persistentVolumeClaim.claimName = "transmission-config";
media.persistentVolumeClaim.claimName = "media";
};
};
};
};
@ -176,6 +162,8 @@
};
spec = {
volumes.config.persistentVolumeClaim.claimName = "jellyseerr-config";
containers.jellyseerr = {
image = "fallenbagel/jellyseerr:1.7.0";
envFrom = [{ configMapRef.name = "jellyseerr-env"; }];
@ -190,11 +178,6 @@
mountPath = "/app/config";
}];
};
volumes = [{
name = "config";
persistentVolumeClaim.claimName = "jellyseerr-config";
}];
};
};
};
@ -240,16 +223,10 @@
];
};
volumes = [
{
name = "config";
persistentVolumeClaim.claimName = "radarr-config";
}
{
name = "media";
persistentVolumeClaim.claimName = "media";
}
];
volumes = {
config.persistentVolumeClaim.claimName = "radarr-config";
media.persistentVolumeClaim.claimName = "media";
};
};
};
};
@ -274,6 +251,8 @@
};
spec = {
volumes.config.persistentVolumeClaim.claimName = "prowlarr-config";
containers.prowlarr = {
image = "lscr.io/linuxserver/prowlarr:latest";
envFrom = [{ configMapRef.name = "prowlarr-env"; }];
@ -288,11 +267,6 @@
mountPath = "/config";
}];
};
volumes = [{
name = "config";
persistentVolumeClaim.claimName = "prowlarr-config";
}];
};
};
};
@ -338,16 +312,10 @@
];
};
volumes = [
{
name = "config";
persistentVolumeClaim.claimName = "sonarr-config";
}
{
name = "media";
persistentVolumeClaim.claimName = "media";
}
];
volumes = {
config.persistentVolumeClaim.claimName = "sonarr-config";
media.persistentVolumeClaim.claimName = "media";
};
};
};
};
@ -393,16 +361,10 @@
];
};
volumes = [
{
name = "config";
persistentVolumeClaim.claimName = "bazarr-config";
}
{
name = "media";
persistentVolumeClaim.claimName = "media";
}
];
volumes = {
config.persistentVolumeClaim.claimName = "bazarr-config";
media.persistentVolumeClaim.claimName = "media";
};
};
};
};

View file

@ -12,6 +12,8 @@
metadata.labels.app = "minecraft";
spec = {
volumes.data.persistentVolumeClaim.claimName = "minecraft";
containers.minecraft = {
image = "itzg/minecraft-server";
envFrom = [{ configMapRef.name = "minecraft-env"; }];
@ -26,11 +28,6 @@
mountPath = "/data";
}];
};
volumes = [{
name = "data";
persistentVolumeClaim.claimName = "minecraft";
}];
};
};
};

View file

@ -18,6 +18,8 @@
metadata.labels.app = "nextcloud";
spec = {
volumes.data.persistentVolumeClaim.claimName = "nextcloud";
containers.nextcloud = {
image = "nextcloud:27";
envFrom = [{ configMapRef.name = "nextcloud"; }];
@ -27,25 +29,16 @@
protocol = "TCP";
}];
env = [{
name = "POSTGRES_PASSWORD";
valueFrom.secretKeyRef = {
name = "nextcloud";
key = "databasePassword";
};
}];
env.POSTGRES_PASSWORD.valueFrom.secretKeyRef = {
name = "nextcloud";
key = "databasePassword";
};
volumeMounts = [{
name = "data";
mountPath = "/var/www/html";
}];
};
volumes = [{
name = "data";
persistentVolumeClaim.claimName = "nextcloud";
}];
};
};
};

View file

@ -41,6 +41,8 @@
};
spec = {
volumes.data.persistentVolumeClaim.claimName = "paperless-ngx-data";
containers.paperless-ngx = {
image = "ghcr.io/paperless-ngx/paperless-ngx:2.3";
envFrom = [{ configMapRef.name = "paperless-ngx"; }];
@ -50,35 +52,22 @@
protocol = "TCP";
}];
env = [
{
name = "PAPERLESS_DBPASS";
valueFrom.secretKeyRef = {
name = "paperless-ngx";
key = "databasePassword";
};
}
{
name = "PAPERLESS_SECRET_KEY";
valueFrom.secretKeyRef = {
name = "paperless-ngx";
key = "secretKey";
};
}
];
env = {
PAPERLESS_DBPASS.valueFrom.secretKeyRef = {
name = "paperless-ngx";
key = "databasePassword";
};
PAPERLESS_SECRET_KEY.valueFrom.secretKeyRef = {
name = "paperless-ngx";
key = "secretKey";
};
};
volumeMounts = [{
name = "data";
mountPath = "/data";
}];
};
volumes = [{
name = "data";
persistentVolumeClaim.claimName = "paperless-ngx-data";
}];
};
};
};
@ -103,6 +92,8 @@
};
spec = {
volumes.data.persistentVolumeClaim.claimName = "paperless-ngx-redisdata";
containers.redis = {
image = "docker.io/library/redis:7";
@ -116,11 +107,6 @@
mountPath = "/data";
}];
};
volumes = [{
name = "data";
persistentVolumeClaim.claimName = "paperless-ngx-redisdata";
}];
};
};
};

View file

@ -32,15 +32,10 @@
}
];
env = [{
# TODO: simplify this by using env.WEBPASSWORD?
name = "WEBPASSWORD";
valueFrom.secretKeyRef = {
name = "pihole";
key = "webPassword";
};
}];
env.WEBPASSWORD.valueFrom.secretKeyRef = {
name = "pihole";
key = "webPassword";
};
volumeMounts = [
{
@ -54,16 +49,10 @@
];
};
volumes = [
{
name = "data";
persistentVolumeClaim.claimName = "pihole-data";
}
{
name = "dnsmasq";
persistentVolumeClaim.claimName = "pihole-dnsmasq";
}
];
volumes = {
data.persistentVolumeClaim.claimName = "pihole-data";
dnsmasq.persistentVolumeClaim.claimName = "pihole-dnsmasq";
};
};
};
};

View file

@ -68,16 +68,10 @@
];
};
volumes = [
{
name = "data";
persistentVolumeClaim.claimName = "radicale";
}
{
name = "config";
configMap.name = "radicale";
}
];
volumes = {
data.persistentVolumeClaim.claimName = "radicale";
config.configMap.name = "radicale";
};
};
};
};

View file

@ -37,16 +37,10 @@
];
};
volumes = [
{
name = "config";
persistentVolumeClaim.claimName = "syncthing";
}
{
name = "nextcloud-data";
persistentVolumeClaim.claimName = "nextcloud";
}
];
volumes = {
config.persistentVolumeClaim.claimName = "syncthing";
nextcloud-data.persistentVolumeClaim.claimName = "nextcloud";
};
};
};
};