forked from hswaw/hscloud
personal/radex: +demo-next
Change-Id: I7563f509e12ee1d6ec83261f3ad6386d8033fdc5 Reviewed-on: https://gerrit.hackerspace.pl/c/hscloud/+/1570
This commit is contained in:
parent
e632263635
commit
ae2a725bd2
1 changed files with 63 additions and 0 deletions
63
personal/radex/demo-next/prod.jsonnet
Normal file
63
personal/radex/demo-next/prod.jsonnet
Normal file
|
@ -0,0 +1,63 @@
|
|||
local kube = import "../../../kube/kube.libsonnet";
|
||||
|
||||
{
|
||||
local top = self,
|
||||
local cfg = self.cfg,
|
||||
|
||||
cfg:: {
|
||||
name: "demo-next",
|
||||
image: "registry.k0.hswaw.net/radex/next-bruh:v1",
|
||||
domain: "demo-next.hs.radex.io",
|
||||
},
|
||||
|
||||
ns: kube.Namespace("personal-radex"),
|
||||
|
||||
deployment: top.ns.Contain(kube.Deployment(cfg.name)) {
|
||||
spec+: {
|
||||
replicas: 3,
|
||||
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: 3000 },
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
service: top.ns.Contain(kube.Service(cfg.name)) {
|
||||
target_pod:: top.deployment.spec.template,
|
||||
},
|
||||
|
||||
ingress: top.ns.Contain(kube.Ingress(cfg.name)) {
|
||||
metadata+: {
|
||||
annotations+: {
|
||||
"kubernetes.io/tls-acme": "true",
|
||||
"cert-manager.io/cluster-issuer": "letsencrypt-prod",
|
||||
"nginx.ingress.kubernetes.io/proxy-body-size": "0",
|
||||
},
|
||||
},
|
||||
spec+: {
|
||||
tls: [ { hosts: [ cfg.domain ], secretName: cfg.name + "-tls" } ],
|
||||
rules: [
|
||||
{
|
||||
host: cfg.domain,
|
||||
http: {
|
||||
paths: [
|
||||
{ path: "/", backend: top.service.name_port },
|
||||
],
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue