blob: 7f3ec5b198b0f212ba0a3579277720a021ca7869 [file] [log] [blame]
local kube = import "../../../../kube/hscloud.libsonnet";
{
local top = self,
local cfg = self.cfg,
cfg:: {
name: 'cebulacamp',
namespace: 'cebulacamp',
domain: 'cebula.camp',
image: 'registry.k0.hswaw.net/q3k/cebulacamp-landing:315532800-bbf56cf7e14df954dcddedfe44c967246f11b72c',
},
ns: kube.Namespace(cfg.namespace),
deployment: top.ns.Contain(kube.Deployment(cfg.name)) {
spec+: {
replicas: 1,
template+: {
spec+: {
containers_: {
default: kube.Container("default") {
image: cfg.image,
command: [
"/hscloud/hswaw/cebulacamp/landing/backend",
"-logtostderr",
],
resources: {
requests: { cpu: "25m", memory: "64Mi" },
limits: { cpu: "500m", memory: "128Mi" },
},
ports_: {
http: { containerPort: 8080 },
},
},
},
},
},
},
},
service: top.ns.Contain(kube.Service(cfg.name)) {
target:: top.deployment,
},
ingress: top.ns.Contain(kube.SimpleIngress(cfg.name)) {
hosts:: [cfg.domain],
target_service:: top.service,
},
}