blob: 1760e01e207581562a130ecb5371b3884a080061 [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",
local ns = app.ns,
deployment: 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: ns.Contain(kube.Service("wellknown")) {
target:: app.deployment,
},
}