blob: b2466b07cb7c2f0fae3c50a783890c53fff6ec49 [file] [log] [blame]
local kube = import "../../../kube/hscloud.libsonnet";
{
local top = self,
local cfg = self.cfg,
cfg:: {
name: "demo",
image: "registry.k0.hswaw.net/radex/bruh:v3",
domain: "demo.hs.radex.io",
},
local ns = kube.Namespace("personal-radex"),
deployment: ns.Contain(kube.Deployment(cfg.name)) {
spec+: {
replicas: 1,
template+: {
spec+: {
containers_: {
default: kube.Container("default") {
image: cfg.image,
resources: {
requests: { cpu: "0.01", memory: "64M" },
limits: { cpu: "1", memory: "256M" },
},
ports_: {
http: { containerPort: 8080 },
},
},
},
},
},
},
},
service: ns.Contain(kube.Service(cfg.name)) {
target:: top.deployment,
},
ingress: ns.Contain(kube.SimpleIngress(cfg.name)) {
hosts:: [cfg.domain],
target:: top.service,
},
}