forked from hswaw/hscloud
42 lines
1.3 KiB
Plaintext
42 lines
1.3 KiB
Plaintext
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_pod:: app.deployment.spec.template,
|
|
},
|
|
}
|