blob: 7f3ec5b198b0f212ba0a3579277720a021ca7869 [file] [log] [blame]
radex63328a32023-11-18 09:36:38 +01001local kube = import "../../../../kube/hscloud.libsonnet";
2
3{
4 local top = self,
5 local cfg = self.cfg,
6
7 cfg:: {
8 name: 'cebulacamp',
9 namespace: 'cebulacamp',
10 domain: 'cebula.camp',
11 image: 'registry.k0.hswaw.net/q3k/cebulacamp-landing:315532800-bbf56cf7e14df954dcddedfe44c967246f11b72c',
12 },
13
14 ns: kube.Namespace(cfg.namespace),
15
16 deployment: top.ns.Contain(kube.Deployment(cfg.name)) {
17 spec+: {
18 replicas: 1,
19 template+: {
20 spec+: {
21 containers_: {
22 default: kube.Container("default") {
23 image: cfg.image,
24 command: [
25 "/hscloud/hswaw/cebulacamp/landing/backend",
26 "-logtostderr",
27 ],
28 resources: {
29 requests: { cpu: "25m", memory: "64Mi" },
30 limits: { cpu: "500m", memory: "128Mi" },
31 },
32 ports_: {
33 http: { containerPort: 8080 },
34 },
35 },
36 },
37 },
38 },
39 },
40 },
41
42 service: top.ns.Contain(kube.Service(cfg.name)) {
radex8b8f3872023-11-24 11:09:46 +010043 target:: top.deployment,
radex63328a32023-11-18 09:36:38 +010044 },
45
46 ingress: top.ns.Contain(kube.SimpleIngress(cfg.name)) {
47 hosts:: [cfg.domain],
48 target_service:: top.service,
49 },
50}