blob: 49c9aa3e7a1db674b657b0b5c4e10243dc73b1fa [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 Bazanskic315aac2020-01-02 16:43:39 +010022 teleimg: teleimg.component(cfg.teleimg, env),
Sergiusz Bazanski6f773e02019-10-02 20:46:48 +020023 },
24 },
25
26 prod: self.hswaw("hswaw-prod") {
27 cfg+: {
28 smsgw+: {
29 secret+: {
30 twilio_token: std.base64(std.split(importstr "secrets/plain/prod-twilio-token", "\n")[0]),
31 },
32 webhookFQDN: "smsgw-webhook-prod.hswaw.net",
Sergiusz Bazanski5b866622019-10-18 14:54:36 +020033 },
34 ldapweb+: {
Sergiusz Bazanski831a54a2019-10-20 17:38:22 +020035 webFQDN: "profile.hackerspace.pl",
Sergiusz Bazanski5b866622019-10-18 14:54:36 +020036 },
Sergiusz Bazanskic315aac2020-01-02 16:43:39 +010037 teleimg+: {
38 webFQDN: "teleimg.hswaw.net",
39 secret+: {
40 telegram_token: std.base64(std.split(importstr "secrets/plain/prod-telegram-token", "\n")[0]),
41 },
42 },
Sergiusz Bazanski6f773e02019-10-02 20:46:48 +020043 },
44 },
45}