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
|
|
|
};
|
|
|
|
|
2024-04-14 12:48:27 +00:00
|
|
|
secrets.kitchenowl.stringData.jwtSecretKey = "ref+sops://secrets/sops.yaml#/kitchenowl/jwtSecretKey";
|
2024-03-29 13:26:05 +00:00
|
|
|
|
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-04-14 19:43:31 +00:00
|
|
|
ports.web.containerPort = 80;
|
2024-04-03 19:19:37 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
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 = {
|
2024-04-14 19:00:15 +00:00
|
|
|
volumes.data.persistentVolumeClaim.claimName = "kitchenowl";
|
|
|
|
|
2024-04-03 19:19:37 +00:00
|
|
|
containers.kitchenowl-backend = {
|
|
|
|
image = "tombursch/kitchenowl:v92";
|
2024-04-14 19:43:31 +00:00
|
|
|
ports.web.containerPort = 5000;
|
2024-03-29 13:26:05 +00:00
|
|
|
|
|
|
|
volumeMounts = [{
|
|
|
|
name = "data";
|
|
|
|
mountPath = "/data";
|
|
|
|
}];
|
|
|
|
};
|
2024-04-03 19:19:37 +00:00
|
|
|
};
|
2024-03-29 13:26:05 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
persistentVolumes.kitchenowl.spec = {
|
|
|
|
capacity.storage = "1Mi";
|
|
|
|
accessModes = [ "ReadWriteMany" ];
|
|
|
|
|
|
|
|
nfs = {
|
2024-04-12 21:31:10 +00:00
|
|
|
server = "lewis.dmz";
|
2024-03-29 13:26:05 +00:00
|
|
|
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-14 19:43:31 +00:00
|
|
|
ports.web = {
|
2024-04-03 19:19:37 +00:00
|
|
|
port = 80;
|
2024-04-14 19:43:31 +00:00
|
|
|
targetPort = "web";
|
|
|
|
};
|
2024-04-03 19:19:37 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
kitchenowl-backend.spec = {
|
|
|
|
selector = {
|
|
|
|
app = "kitchenowl";
|
|
|
|
component = "backend";
|
|
|
|
};
|
|
|
|
|
2024-04-14 19:43:31 +00:00
|
|
|
ports.web = {
|
2024-04-03 19:19:37 +00:00
|
|
|
port = 5000;
|
2024-04-14 19:43:31 +00:00
|
|
|
targetPort = "web";
|
|
|
|
};
|
2024-04-03 19:19:37 +00:00
|
|
|
};
|
2024-03-29 13:26:05 +00:00
|
|
|
};
|
2024-04-14 21:11:19 +00:00
|
|
|
};
|
2024-03-29 13:26:05 +00:00
|
|
|
|
2024-04-14 21:11:19 +00:00
|
|
|
lab.ingresses.kitchenowl = {
|
|
|
|
host = "boodschappen.kun.is";
|
2024-04-07 12:07:05 +00:00
|
|
|
|
2024-04-14 21:11:19 +00:00
|
|
|
service = {
|
|
|
|
name = "kitchenowl-web";
|
|
|
|
portName = "web";
|
2024-03-29 13:26:05 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|