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), }