blob: 509b83c7c8bc117746507cd955c71f4b8d66a1b6 [file] [log] [blame]
local kube = import "../../../kube/kube.libsonnet";
{
local app = self,
local cfg = app.cfg,
cfg:: {
image: error "cfg.image must be set",
# webDomain is the domain name of matrix homeserver to be served
webDomain: error "cfg.webDomain must be set",
},
ns:: error "ns needs to be a kube.Namespace object",
deployment: app.ns.Contain(kube.Deployment("wellknown")) {
spec+: {
replicas: 1,
template+: {
spec+: {
containers_: {
web: kube.Container("wellknown") {
image: cfg.image,
ports_: {
http: { containerPort: 8080 },
},
command: ["/app/matrix/wellknown"],
args: ["-hspki_disable", "-domain", cfg.webDomain],
},
},
securityContext: {
runAsUser: 101,
runAsGroup: 101,
},
},
},
},
},
svc: app.ns.Contain(kube.Service("wellknown")) {
target:: app.deployment,
},
}