refactor(cyberchef): Rename k8s resources

refactor(freshrss): Remove useless deployment label
This commit is contained in:
Pim Kunis 2024-07-14 12:29:36 +02:00
parent e724ff94a9
commit cf804ac260
2 changed files with 42 additions and 46 deletions

View file

@ -1,6 +1,6 @@
{ {
kubernetes.resources = { kubernetes.resources = {
deployments.cyberchef.spec = { deployments.server.spec = {
replicas = 3; replicas = 3;
selector.matchLabels.app = "cyberchef"; selector.matchLabels.app = "cyberchef";
@ -14,7 +14,7 @@
}; };
}; };
services.cyberchef.spec = { services.server.spec = {
selector.app = "cyberchef"; selector.app = "cyberchef";
ports.web = { ports.web = {
@ -24,11 +24,11 @@
}; };
}; };
lab.ingresses.cyberchef = { lab.ingresses.server = {
host = "cyberchef.kun.is"; host = "cyberchef.kun.is";
service = { service = {
name = "cyberchef"; name = "server";
portName = "web"; portName = "web";
}; };
}; };

View file

@ -2,65 +2,61 @@
kubernetes.resources = { kubernetes.resources = {
secrets.server.stringData.adminPassword = "ref+sops://secrets/kubernetes.yaml#/freshrss/password"; secrets.server.stringData.adminPassword = "ref+sops://secrets/kubernetes.yaml#/freshrss/password";
deployments.server = { deployments.server.spec = {
metadata.labels.app = "freshrss"; selector.matchLabels.app = "freshrss";
spec = { strategy = {
selector.matchLabels.app = "freshrss"; type = "RollingUpdate";
strategy = { rollingUpdate = {
type = "RollingUpdate"; maxSurge = 0;
maxUnavailable = 1;
rollingUpdate = {
maxSurge = 0;
maxUnavailable = 1;
};
}; };
};
template = { template = {
metadata.labels.app = "freshrss"; metadata.labels.app = "freshrss";
spec = { spec = {
containers.freshrss = { containers.freshrss = {
image = "freshrss/freshrss:1.24.1"; image = "freshrss/freshrss:1.24.1";
imagePullPolicy = "Always"; imagePullPolicy = "Always";
ports.web.containerPort = 80; ports.web.containerPort = 80;
env = { env = {
TZ.value = "Europe/Amsterdam"; TZ.value = "Europe/Amsterdam";
CRON_MIN.value = "2,32"; CRON_MIN.value = "2,32";
ADMIN_EMAIL.value = "pim@kunis.nl"; ADMIN_EMAIL.value = "pim@kunis.nl";
PUBLISHED_PORT.value = "443"; PUBLISHED_PORT.value = "443";
ADMIN_PASSWORD.valueFrom.secretKeyRef = { ADMIN_PASSWORD.valueFrom.secretKeyRef = {
name = "server"; name = "server";
key = "adminPassword"; key = "adminPassword";
};
ADMIN_API_PASSWORD.valueFrom.secretKeyRef = {
name = "server";
key = "adminPassword";
};
}; };
volumeMounts = [{ ADMIN_API_PASSWORD.valueFrom.secretKeyRef = {
name = "data"; name = "server";
mountPath = "/var/www/FreshRSS/data"; key = "adminPassword";
}]; };
}; };
volumes.data.persistentVolumeClaim.claimName = "data"; volumeMounts = [{
name = "data";
mountPath = "/var/www/FreshRSS/data";
}];
};
securityContext = { volumes.data.persistentVolumeClaim.claimName = "data";
fsGroup = 33;
fsGroupChangePolicy = "OnRootMismatch"; securityContext = {
}; fsGroup = 33;
fsGroupChangePolicy = "OnRootMismatch";
}; };
}; };
}; };
}; };
services.web.spec = { services.server.spec = {
selector.app = "freshrss"; selector.app = "freshrss";
ports.web = { ports.web = {