blob: 41ff73d92e09aed50f310ea5a230d1e767f132c5 [file] [log] [blame]
local mirko = import "../../kube/mirko.libsonnet";
local kube = import "../../kube/kube.libsonnet";
local smsgw = import "smsgw.libsonnet";
local ldapweb = import "ldapweb.libsonnet";
local teleimg = import "teleimg.libsonnet";
local frab = import "frab.libsonnet";
local pretalx = import "pretalx.libsonnet";
local cebulacamp = import "cebulacamp.libsonnet";
{
hswaw(name):: mirko.Environment(name) {
local env = self,
local cfg = self.cfg,
cfg+: {
smsgw: smsgw.cfg,
ldapweb: ldapweb.cfg,
teleimg: teleimg.cfg,
frab: frab.cfg,
pretalx: pretalx.cfg,
cebulacamp: cebulacamp.cfg,
},
components: {
smsgw: smsgw.component(cfg.smsgw, env),
ldapweb: ldapweb.component(cfg.ldapweb, env),
teleimg: teleimg.teleimg(cfg.teleimg, env),
lelegram: teleimg.lelegram(cfg.teleimg, env),
frab: frab.component(cfg.frab, env),
pretalx: pretalx.component(cfg.pretalx, env),
cebulacamp: cebulacamp.component(cfg.cebulacamp, env),
},
},
prod: self.hswaw("hswaw-prod") {
cfg+: {
smsgw+: {
secret+: {
twilio_token: std.base64(std.split(importstr "secrets/plain/prod-twilio-token", "\n")[0]),
},
webhookFQDN: "smsgw-webhook-prod.hswaw.net",
},
ldapweb+: {
webFQDN: "profile.hackerspace.pl",
},
teleimg+: {
webFQDN: "teleimg.hswaw.net",
secret+: {
telegram_token: std.base64(std.split(importstr "secrets/plain/prod-telegram-token", "\n")[0]),
},
},
frab+: {
storageClassName: "waw-hdd-redundant-3",
webFQDN: "frab.hackerspace.pl",
secret+: {
secretKeyBase: std.base64(std.split(importstr "secrets/plain/prod-frab-smtp-password", "\n")[0]),
smtpPassword: std.base64(std.split(importstr "secrets/plain/prod-frab-secret-key-base", "\n")[0]),
},
},
pretalx+: {
storageClassName: "waw-hdd-redundant-3",
webFQDN: "cfp.cebula.camp",
smtpPassword: std.base64(std.split(importstr "secrets/plain/prod-pretalx-smtp-password", "\n")[0]),
s3+: {
credsSecret: import "secrets/plain/prod-pretalx-s3.json",
},
},
cebulacamp+: {
webFQDN: "cebula.camp",
},
},
},
}