Some checks failed
CI / build (push) Failing after 12s
GitOrigin-RevId: 6370f6ea785709295b6abcf9c60717cacf3ac432
72 lines
1.6 KiB
Jsonnet
72 lines
1.6 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 = 5001;
|
|
local Params = kube.simpleFieldStruct([
|
|
"namespace",
|
|
"name",
|
|
"filePath",
|
|
"storageClaimMode",
|
|
]) {
|
|
labels: {},
|
|
gatekeeperSidecar: null,
|
|
lsParams: linuxserver.AppParams {
|
|
name: $.name,
|
|
namespace: $.namespace,
|
|
filePath: $.filePath,
|
|
templatePath: std.thisFile,
|
|
baseAppName: "whitebophir",
|
|
imageName: "lovasoa/wbo",
|
|
labels+: $.labels,
|
|
gatekeeperSidecar: $.gatekeeperSidecar,
|
|
ports: [ kube.DeployUtil.ContainerPort("http", WebPort), ],
|
|
env: linuxserver.Env {
|
|
others: [
|
|
kube.NameVal("PORT", std.toString(WebPort)),
|
|
#kube.NameVal("HOST", "127.0.0.1"),
|
|
]
|
|
},
|
|
services: [
|
|
linuxserver.Service {
|
|
suffix: "ui",
|
|
spec: kube.SvcUtil.BasicHttpClusterIpSpec(WebPort)
|
|
},
|
|
],
|
|
pvcs: [
|
|
linuxserver.Pvc{
|
|
name: "storage",
|
|
mountPath: "/opt/app/server-data",
|
|
bindName: $.storageClaimName,
|
|
},
|
|
],
|
|
resources: {
|
|
requests: {
|
|
cpu: "400m",
|
|
memory: "256Mi",
|
|
},
|
|
limits: {
|
|
cpu: "1500m",
|
|
memory: "512Mi",
|
|
},
|
|
},
|
|
livenessProbe: probe(/*delaySeconds=*/60),
|
|
readinessProbe: probe(/*delaySeconds=*/60),
|
|
},
|
|
};
|
|
|
|
local App(params) = linuxserver.App(params.lsParams) {};
|
|
|
|
{
|
|
Params: Params,
|
|
WebPort: WebPort,
|
|
App(params): App(params),
|
|
}
|