blob: f5501769c497b0af3cf435b7f5924522fd15b5c4 [file] [log] [blame]
Sergiusz Bazanski6f773e02019-10-02 20:46:48 +02001local mirko = import "../../kube/mirko.libsonnet";
2local kube = import "../../kube/kube.libsonnet";
3
Sergiusz Bazanskid0ec2c62019-11-21 00:08:52 +01004local smsgw = import "smsgw.libsonnet";
5local ldapweb = import "ldapweb.libsonnet";
Sergiusz Bazanskic315aac2020-01-02 16:43:39 +01006local teleimg = import "teleimg.libsonnet";
Sergiusz Bazanskid0ec2c62019-11-21 00:08:52 +01007
Sergiusz Bazanski6f773e02019-10-02 20:46:48 +02008{
9 hswaw(name):: mirko.Environment(name) {
10 local env = self,
11 local cfg = self.cfg,
12
13 cfg+: {
Sergiusz Bazanskid0ec2c62019-11-21 00:08:52 +010014 smsgw: smsgw.cfg,
15 ldapweb: ldapweb.cfg,
Sergiusz Bazanskic315aac2020-01-02 16:43:39 +010016 teleimg: teleimg.cfg,
Sergiusz Bazanski6f773e02019-10-02 20:46:48 +020017 },
18
19 components: {
Sergiusz Bazanskid0ec2c62019-11-21 00:08:52 +010020 smsgw: smsgw.component(cfg.smsgw, env),
21 ldapweb: ldapweb.component(cfg.ldapweb, env),
Sergiusz Bazanskia8854882020-01-05 00:34:38 +010022 teleimg: teleimg.teleimg(cfg.teleimg, env),
23 lelegram: teleimg.lelegram(cfg.teleimg, env),
Sergiusz Bazanski6f773e02019-10-02 20:46:48 +020024 },
25 },
26
27 prod: self.hswaw("hswaw-prod") {
28 cfg+: {
29 smsgw+: {
30 secret+: {
31 twilio_token: std.base64(std.split(importstr "secrets/plain/prod-twilio-token", "\n")[0]),
32 },
33 webhookFQDN: "smsgw-webhook-prod.hswaw.net",
Sergiusz Bazanski5b866622019-10-18 14:54:36 +020034 },
35 ldapweb+: {
Sergiusz Bazanski831a54a2019-10-20 17:38:22 +020036 webFQDN: "profile.hackerspace.pl",
Sergiusz Bazanski5b866622019-10-18 14:54:36 +020037 },
Sergiusz Bazanskic315aac2020-01-02 16:43:39 +010038 teleimg+: {
39 webFQDN: "teleimg.hswaw.net",
40 secret+: {
41 telegram_token: std.base64(std.split(importstr "secrets/plain/prod-telegram-token", "\n")[0]),
42 },
43 },
Sergiusz Bazanski6f773e02019-10-02 20:46:48 +020044 },
45 },
46}