yesod-mirror/k8s/configs/templates/personal/media/sabnzbd.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

80 lines
1.8 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: 15,
tcpSocket: {
port: "http",
},
};
local WebPort = 8080;
local Params = kube.simpleFieldStruct([
"namespace",
"name",
"filePath",
"configClaimName",
"incompleteDownloadsClaimName",
"downloadsClaimName",
]) {
#local httpsWebPort = 9090,
labels: {},
gatekeeperSidecar: null,
lsParams: linuxserver.AppParams {
name: $.name,
namespace: $.namespace,
filePath: $.filePath,
templatePath: std.thisFile,
baseAppName: "sabnzbd",
imageName: "linuxserver/sabnzbd",
labels+: $.labels,
gatekeeperSidecar: $.gatekeeperSidecar,
services: [
linuxserver.Service {
suffix: "ui",
spec: kube.SvcUtil.BasicHttpClusterIpSpec(WebPort)
},
],
ports: [ kube.DeployUtil.ContainerPort("http", WebPort), ],
pvcs: [
linuxserver.Pvc{
name: "config",
mountPath: "/config",
bindName: $.configClaimName,
},
linuxserver.Pvc{
name: "incomplete-downloads",
mountPath: "/incomplete-downloads",
bindName: $.incompleteDownloadsClaimName,
},
linuxserver.Pvc{
name: "downloads",
mountPath: "/downloads",
bindName: $.downloadsClaimName,
},
],
resources: {
requests: {
cpu: "100m",
memory: "1024Mi",
},
limits: {
cpu: "400m",
memory: "2024Mi",
},
},
livenessProbe: probe(/*delaySeconds=*/120),
readinessProbe: probe(/*delaySeconds=*/120),
},
};
local App(params) = linuxserver.App(params.lsParams);
{
WebPort: WebPort,
Params: Params,
App(params): App(params),
}