nixos-servers/kubenix-modules/kitchenowl.nix

73 lines
1.5 KiB
Nix
Raw Normal View History

2024-03-29 13:26:05 +00:00
{
kubernetes.resources = {
secrets.server.stringData.jwtSecretKey = "ref+sops://secrets/kubernetes.yaml#/kitchenowl/jwtSecretKey";
2024-03-29 13:26:05 +00:00
deployments.server.spec = {
selector.matchLabels.app = "kitchenowl";
strategy = {
type = "RollingUpdate";
rollingUpdate = {
maxSurge = 0;
maxUnavailable = 1;
};
};
template = {
metadata.labels.app = "kitchenowl";
2024-03-29 13:26:05 +00:00
spec = {
volumes.data.persistentVolumeClaim.claimName = "data";
2024-04-14 19:00:15 +00:00
containers.kitchenowl = {
image = "tombursch/kitchenowl:v0.5.1";
ports.web.containerPort = 8080;
imagePullPolicy = "Always";
2024-04-29 15:43:44 +00:00
env.JWT_SECRET_KEY.valueFrom.secretKeyRef = {
name = "server";
key = "jwtSecretKey";
2024-05-23 19:19:29 +00:00
};
2024-03-29 13:26:05 +00:00
volumeMounts = [{
name = "data";
mountPath = "/data";
}];
};
securityContext = {
fsGroup = 0;
fsGroupChangePolicy = "OnRootMismatch";
2024-03-29 13:26:05 +00:00
};
};
};
};
services.server.spec = {
2024-04-29 15:43:44 +00:00
selector.app = "kitchenowl";
2024-04-29 15:43:44 +00:00
ports.web = {
port = 80;
targetPort = "web";
};
2024-03-29 13:26:05 +00:00
};
};
2024-03-29 13:26:05 +00:00
lab = {
ingresses.web = {
host = "boodschappen.kun.is";
service = {
name = "server";
portName = "web";
};
2024-03-29 13:26:05 +00:00
};
longhorn.persistentVolumeClaim.data = {
volumeName = "kitchenowl";
storage = "100Mi";
};
2024-03-29 13:26:05 +00:00
};
}