Update KitchenOwl to v0.5.1

This commit is contained in:
Pim Kunis 2024-04-29 17:43:44 +02:00
parent 34ffaa09a8
commit 654f754286

View file

@ -1,65 +1,29 @@
{ {
kubernetes.resources = { kubernetes.resources = {
configMaps.kitchenowl.data = {
BACK_URL = "kitchenowl-backend.default.svc.cluster.local:5000";
};
secrets.kitchenowl.stringData.jwtSecretKey = "ref+sops://secrets/sops.yaml#/kitchenowl/jwtSecretKey"; secrets.kitchenowl.stringData.jwtSecretKey = "ref+sops://secrets/sops.yaml#/kitchenowl/jwtSecretKey";
deployments = { deployments = {
# TODO: this is quite a lot of boilerplate to create these deployments
# Create custom nixos module for this? kitchenowl = {
kitchenowl-frontend = { metadata.labels.app = "kitchenowl";
metadata.labels = {
app = "kitchenowl";
component = "frontend";
};
spec = { spec = {
selector.matchLabels = { selector.matchLabels.app = "kitchenowl";
app = "kitchenowl";
component = "frontend";
};
template = { template = {
metadata.labels = { metadata.labels.app = "kitchenowl";
app = "kitchenowl";
component = "frontend";
};
spec.containers.kitchenowl-frontend = {
image = "tombursch/kitchenowl-web:v0.4.20";
envFrom = [{ configMapRef.name = "kitchenowl"; }];
ports.web.containerPort = 80;
};
};
};
};
kitchenowl-backend = {
metadata.labels = {
app = "kitchenowl";
component = "backend";
};
spec = {
selector.matchLabels = {
app = "kitchenowl";
component = "backend";
};
template = {
metadata.labels = {
app = "kitchenowl";
component = "backend";
};
spec = { spec = {
volumes.data.persistentVolumeClaim.claimName = "kitchenowl"; volumes.data.persistentVolumeClaim.claimName = "kitchenowl";
containers.kitchenowl-backend = { containers.kitchenowl = {
image = "tombursch/kitchenowl:v92"; image = "tombursch/kitchenowl:v0.5.1";
ports.web.containerPort = 5000; ports.web.containerPort = 8080;
env.JWT_SECRET_KEY.valueFrom.secretKeyRef = {
name = "kitchenowl";
key = "jwtSecretKey";
};
volumeMounts = [{ volumeMounts = [{
name = "data"; name = "data";
@ -72,29 +36,12 @@
}; };
}; };
services = { services.kitchenowl.spec = {
kitchenowl-web.spec = { selector.app = "kitchenowl";
selector = {
app = "kitchenowl";
component = "frontend";
};
ports.web = { ports.web = {
port = 80; port = 80;
targetPort = "web"; targetPort = "web";
};
};
kitchenowl-backend.spec = {
selector = {
app = "kitchenowl";
component = "backend";
};
ports.web = {
port = 5000;
targetPort = "web";
};
}; };
}; };
}; };
@ -106,7 +53,7 @@
host = "boodschappen.kun.is"; host = "boodschappen.kun.is";
service = { service = {
name = "kitchenowl-web"; name = "kitchenowl";
portName = "web"; portName = "web";
}; };
}; };