| local kube = import "../../../kube/hscloud.libsonnet"; |
| |
| { |
| local top = self, |
| local cfg = top.cfg, |
| |
| cfg:: { |
| name: 'fuck-nixos', |
| namespace: 'personal-radex', |
| domain: 'fucknixos.radex.hscloud.ovh', |
| image: 'registry.k0.hswaw.net/radex/fuck-nixos:20231215211719', |
| }, |
| |
| local ns = kube.Namespace(cfg.namespace), |
| |
| deployment: ns.Contain(kube.Deployment(cfg.name)) { |
| spec+: { |
| template+: { |
| spec+: { |
| containers_: { |
| default: kube.Container('default') { |
| image: cfg.image, |
| 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, |
| }, |
| } |