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 = 1313; local Params = kube.simpleFieldStruct([ "namespace", "name", "filePath", "dataClaimName", ]) { labels: {}, mountSubPath: null, gatekeeperSidecar: null, lsParams: linuxserver.AppParams { name: $.name, namespace: $.namespace, filePath: $.filePath, templatePath: std.thisFile, baseAppName: "hugo", imageName: "hugomods/hugo", labels+: $.labels, gatekeeperSidecar: $.gatekeeperSidecar, env: linuxserver.Env { others+: [ ], }, args: [ "server", "--disableFastRender" ], services: [ linuxserver.Service { suffix: "ui", spec: kube.SvcUtil.BasicHttpClusterIpSpec(WebPort) }, ], ports: [ kube.DeployUtil.ContainerPort("http", WebPort), ], pvcs: [ linuxserver.Pvc{ name: "data", mountPath: "/src", bindName: $.dataClaimName, mountSubPath: $.mountSubPath, }, ], resources: { requests: { cpu: "150m", memory: "512Mi", }, limits: { cpu: "250m", memory: "1Gi", }, }, livenessProbe: probe(/*delaySeconds=*/20), readinessProbe: probe(/*delaySeconds=*/20), }, }; local App(params) = linuxserver.App(params.lsParams); { Params: Params, WebPort: WebPort, App(params): App(params), }