mirror of
https://gerrit.hackerspace.pl/hscloud
synced 2025-03-16 10:34:53 +00:00
personal/radex: +demo
Change-Id: I4948a4ebc33c2331ed8def3396f18def234fbd0d Reviewed-on: https://gerrit.hackerspace.pl/c/hscloud/+/1567
This commit is contained in:
parent
6de8e41f5c
commit
df18c80b1e
2 changed files with 65 additions and 0 deletions
10
personal/radex/demo/README.md
Normal file
10
personal/radex/demo/README.md
Normal file
|
@ -0,0 +1,10 @@
|
|||
```
|
||||
prodaccess
|
||||
# if broken, check $PATH and/or run
|
||||
bazel run //tools:install
|
||||
|
||||
kubecfg update personal/radex/demo/prod.jsonnet
|
||||
|
||||
# see health
|
||||
kubectl -n personal-radex get all,cm,secret,ing
|
||||
```
|
55
personal/radex/demo/prod.jsonnet
Normal file
55
personal/radex/demo/prod.jsonnet
Normal file
|
@ -0,0 +1,55 @@
|
|||
local kube = import "../../../kube/kube.libsonnet";
|
||||
|
||||
{
|
||||
local top = self,
|
||||
local cfg = self.cfg,
|
||||
|
||||
cfg:: {
|
||||
name: "demo",
|
||||
image: "crccheck/hello-world",
|
||||
domain: "demo.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: 8000 },
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
service: top.ns.Contain(kube.Service(cfg.name)) {
|
||||
target_pod:: top.deployment.spec.template,
|
||||
},
|
||||
|
||||
ingress: top.ns.Contain(kube.Ingress(cfg.name)) {
|
||||
spec+: {
|
||||
rules: [
|
||||
{
|
||||
host: cfg.domain,
|
||||
http: {
|
||||
paths: [
|
||||
{ path: "/", backend: top.service.name_port },
|
||||
],
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
}
|
||||
}
|
Loading…
Add table
Reference in a new issue