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: 20, tcpSocket: { port: "http", }, }; local Params = kube.simpleFieldStruct([ "namespace", "name", "filePath", "configClaimName", ]) { local webPort = 80, labels: {}, gatekeeperSidecar: null, lsParams: linuxserver.AppParams { name: $.name, namespace: $.namespace, filePath: $.filePath, templatePath: std.thisFile, baseAppName: "freshrss", imageName: "linuxserver/freshrss", labels+: $.labels, gatekeeperSidecar: $.gatekeeperSidecar, services: [ linuxserver.Service { suffix: "ui", spec: kube.SvcUtil.BasicHttpClusterIpSpec(webPort) }, ], ports: [ kube.DeployUtil.ContainerPort("http", webPort), ], pvcs: [ linuxserver.Pvc{ name: "freshrss-config", mountPath: "/config", bindName: $.configClaimName, }, ], resources: { requests: { cpu: "10m", memory: "500Mi", }, limits: { cpu: "400m", memory: "1000Mi", }, }, livenessProbe: probe(/*delaySeconds=*/60), readinessProbe: probe(/*delaySeconds=*/60), }, }; local App(params) = linuxserver.App(params.lsParams) { }; { Params: Params, App(params): App(params), }