2024-03-29 13:26:05 +00:00
|
|
|
{
|
|
|
|
kubernetes.resources = {
|
|
|
|
configMaps.kitchenowl.data = {
|
2024-04-03 19:19:37 +00:00
|
|
|
BACK_URL = "kitchenowl-backend.default.svc.cluster.local:5000";
|
2024-03-29 13:26:05 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
secrets.kitchenowl.stringData.jwtSecretKey = "ref+file:///home/pim/.config/home/vals.yaml#/kitchenowl/jwtSecretKey";
|
|
|
|
|
2024-04-03 19:19:37 +00:00
|
|
|
deployments = {
|
|
|
|
# TODO: this is quite a lot of boilerplate to create these deployments
|
|
|
|
# Create custom nixos module for this?
|
|
|
|
kitchenowl-frontend = {
|
|
|
|
metadata.labels = {
|
|
|
|
app = "kitchenowl";
|
|
|
|
component = "frontend";
|
|
|
|
};
|
|
|
|
|
|
|
|
spec = {
|
|
|
|
selector.matchLabels = {
|
|
|
|
app = "kitchenowl";
|
|
|
|
component = "frontend";
|
|
|
|
};
|
|
|
|
|
|
|
|
template = {
|
|
|
|
metadata.labels = {
|
|
|
|
app = "kitchenowl";
|
|
|
|
component = "frontend";
|
|
|
|
};
|
2024-03-29 13:26:05 +00:00
|
|
|
|
2024-04-03 19:19:37 +00:00
|
|
|
spec.containers.kitchenowl-frontend = {
|
|
|
|
image = "tombursch/kitchenowl-web:v0.4.20";
|
|
|
|
envFrom = [{ configMapRef.name = "kitchenowl"; }];
|
2024-03-29 13:26:05 +00:00
|
|
|
|
2024-04-03 19:19:37 +00:00
|
|
|
ports = [{
|
|
|
|
containerPort = 80;
|
|
|
|
protocol = "TCP";
|
|
|
|
}];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
kitchenowl-backend = {
|
|
|
|
metadata.labels = {
|
|
|
|
app = "kitchenowl";
|
|
|
|
component = "backend";
|
|
|
|
};
|
|
|
|
|
|
|
|
spec = {
|
|
|
|
selector.matchLabels = {
|
|
|
|
app = "kitchenowl";
|
|
|
|
component = "backend";
|
|
|
|
};
|
|
|
|
|
|
|
|
template = {
|
|
|
|
metadata.labels = {
|
|
|
|
app = "kitchenowl";
|
|
|
|
component = "backend";
|
|
|
|
};
|
2024-03-29 13:26:05 +00:00
|
|
|
|
2024-04-03 19:19:37 +00:00
|
|
|
spec = {
|
|
|
|
containers.kitchenowl-backend = {
|
|
|
|
image = "tombursch/kitchenowl:v92";
|
2024-03-29 13:26:05 +00:00
|
|
|
|
|
|
|
ports = [{
|
2024-04-03 19:19:37 +00:00
|
|
|
containerPort = 5000;
|
2024-03-29 13:26:05 +00:00
|
|
|
protocol = "TCP";
|
|
|
|
}];
|
|
|
|
|
|
|
|
volumeMounts = [{
|
|
|
|
name = "data";
|
|
|
|
mountPath = "/data";
|
|
|
|
}];
|
|
|
|
};
|
|
|
|
|
2024-04-03 19:19:37 +00:00
|
|
|
volumes = [{
|
|
|
|
name = "data";
|
|
|
|
persistentVolumeClaim.claimName = "kitchenowl";
|
|
|
|
}];
|
|
|
|
};
|
2024-03-29 13:26:05 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
persistentVolumes.kitchenowl.spec = {
|
|
|
|
capacity.storage = "1Mi";
|
|
|
|
accessModes = [ "ReadWriteMany" ];
|
|
|
|
|
|
|
|
nfs = {
|
|
|
|
server = "lewis.hyp";
|
|
|
|
path = "/mnt/data/nfs/kitchenowl/data";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
persistentVolumeClaims.kitchenowl.spec = {
|
|
|
|
accessModes = [ "ReadWriteMany" ];
|
|
|
|
storageClassName = "";
|
|
|
|
resources.requests.storage = "1Mi";
|
|
|
|
volumeName = "kitchenowl";
|
|
|
|
};
|
|
|
|
|
2024-04-03 19:19:37 +00:00
|
|
|
services = {
|
|
|
|
kitchenowl-web.spec = {
|
|
|
|
selector = {
|
|
|
|
app = "kitchenowl";
|
|
|
|
component = "frontend";
|
|
|
|
};
|
2024-03-29 13:26:05 +00:00
|
|
|
|
2024-04-03 19:19:37 +00:00
|
|
|
ports = [{
|
|
|
|
protocol = "TCP";
|
|
|
|
port = 80;
|
|
|
|
targetPort = 80;
|
|
|
|
}];
|
|
|
|
};
|
|
|
|
|
|
|
|
kitchenowl-backend.spec = {
|
|
|
|
selector = {
|
|
|
|
app = "kitchenowl";
|
|
|
|
component = "backend";
|
|
|
|
};
|
|
|
|
|
|
|
|
ports = [{
|
|
|
|
protocol = "TCP";
|
|
|
|
port = 5000;
|
|
|
|
targetPort = 5000;
|
|
|
|
}];
|
|
|
|
};
|
2024-03-29 13:26:05 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
ingresses.kitchenowl.spec = {
|
|
|
|
ingressClassName = "traefik";
|
|
|
|
|
|
|
|
rules = [{
|
|
|
|
host = "boodschappen.kun.is";
|
|
|
|
|
|
|
|
http.paths = [{
|
|
|
|
path = "/";
|
|
|
|
pathType = "Prefix";
|
|
|
|
|
|
|
|
backend.service = {
|
2024-04-03 19:19:37 +00:00
|
|
|
name = "kitchenowl-web";
|
2024-03-29 13:26:05 +00:00
|
|
|
port.number = 80;
|
|
|
|
};
|
|
|
|
}];
|
|
|
|
}];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|