yesod-mirror/k8s/configs/templates/personal/media/lurker.libsonnet
Copybara 8157b39ea4
Some checks failed
CI / build (push) Failing after 12s
Project import generated by Copybara.
GitOrigin-RevId: 6370f6ea785709295b6abcf9c60717cacf3ac432
2026-01-20 21:26:21 +00:00

69 lines
1.7 KiB
Jsonnet

local kube = import "k8s/configs/base.libsonnet";
local linuxserver = import "k8s/configs/templates/core/linuxserver.libsonnet";
local images = import "k8s/configs/images.libsonnet";
local probe(delaySeconds) = {
initialDelaySeconds: delaySeconds,
periodSeconds: 30,
tcpSocket: {
port: "http",
},
};
local WebPort = 3000;
local Params = kube.simpleFieldStruct([
"namespace",
"name",
"filePath",
"dataClaimName",
]) {
labels: {},
gatekeeperSidecar: null,
lsParams: linuxserver.AppParams {
name: $.name,
namespace: $.namespace,
filePath: $.filePath,
templatePath: std.thisFile,
baseAppName: "lurker",
imageName: "ghcr.io/oppiliappan/lurker",
labels+: $.labels,
gatekeeperSidecar: $.gatekeeperSidecar,
env: linuxserver.Env {
},
services: [
linuxserver.Service {
suffix: "ui",
spec: kube.SvcUtil.BasicHttpClusterIpSpec(WebPort)
},
],
ports: [ kube.DeployUtil.ContainerPort("http", WebPort), ],
pvcs: [
linuxserver.Pvc{
name: "data",
mountPath: "/data",
bindName: $.dataClaimName,
},
],
resources: {
requests: {
cpu: "500m",
memory: "500Mi",
},
limits: {
cpu: "1000m",
memory: "1000Mi",
},
},
livenessProbe: probe(/*delaySeconds=*/10),
readinessProbe: probe(/*delaySeconds=*/10),
},
};
local App(params) = linuxserver.App(params.lsParams);
{
Params: Params,
WebPort: WebPort,
App(params): App(params),
}