blob: 509b83c7c8bc117746507cd955c71f4b8d66a1b6 [file] [log] [blame]
Piotr Dobrowolskib67ae482021-01-31 10:35:38 +01001local kube = import "../../../kube/kube.libsonnet";
2
3{
4 local app = self,
5 local cfg = app.cfg,
6 cfg:: {
7 image: error "cfg.image must be set",
8
9 # webDomain is the domain name of matrix homeserver to be served
10 webDomain: error "cfg.webDomain must be set",
11 },
12
13 ns:: error "ns needs to be a kube.Namespace object",
14
15 deployment: app.ns.Contain(kube.Deployment("wellknown")) {
16 spec+: {
17 replicas: 1,
18 template+: {
19 spec+: {
20 containers_: {
21 web: kube.Container("wellknown") {
22 image: cfg.image,
23 ports_: {
24 http: { containerPort: 8080 },
25 },
26 command: ["/app/matrix/wellknown"],
27 args: ["-hspki_disable", "-domain", cfg.webDomain],
28 },
29 },
30 securityContext: {
31 runAsUser: 101,
32 runAsGroup: 101,
33 },
34 },
35 },
36 },
37 },
38 svc: app.ns.Contain(kube.Service("wellknown")) {
radex8b8f3872023-11-24 11:09:46 +010039 target:: app.deployment,
Piotr Dobrowolskib67ae482021-01-31 10:35:38 +010040 },
41}