blob: 806a0180a9bba9eed3e4093b5552d25f4abb52a6 [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 Bazanski64946962020-02-02 17:15:55 +01007local frab = import "frab.libsonnet";
Sergiusz Bazanski74818e12020-02-18 22:56:21 +01008local pretalx = import "pretalx.libsonnet";
Sergiusz Bazanskid0ec2c62019-11-21 00:08:52 +01009
Sergiusz Bazanski6f773e02019-10-02 20:46:48 +020010{
11 hswaw(name):: mirko.Environment(name) {
12 local env = self,
13 local cfg = self.cfg,
14
15 cfg+: {
Sergiusz Bazanskid0ec2c62019-11-21 00:08:52 +010016 smsgw: smsgw.cfg,
17 ldapweb: ldapweb.cfg,
Sergiusz Bazanskic315aac2020-01-02 16:43:39 +010018 teleimg: teleimg.cfg,
Sergiusz Bazanski64946962020-02-02 17:15:55 +010019 frab: frab.cfg,
Sergiusz Bazanski74818e12020-02-18 22:56:21 +010020 pretalx: pretalx.cfg,
Sergiusz Bazanski6f773e02019-10-02 20:46:48 +020021 },
22
23 components: {
Sergiusz Bazanskid0ec2c62019-11-21 00:08:52 +010024 smsgw: smsgw.component(cfg.smsgw, env),
25 ldapweb: ldapweb.component(cfg.ldapweb, env),
Sergiusz Bazanskia8854882020-01-05 00:34:38 +010026 teleimg: teleimg.teleimg(cfg.teleimg, env),
27 lelegram: teleimg.lelegram(cfg.teleimg, env),
Sergiusz Bazanski64946962020-02-02 17:15:55 +010028 frab: frab.component(cfg.frab, env),
Sergiusz Bazanski74818e12020-02-18 22:56:21 +010029 pretalx: pretalx.component(cfg.pretalx, env),
Sergiusz Bazanski6f773e02019-10-02 20:46:48 +020030 },
31 },
32
33 prod: self.hswaw("hswaw-prod") {
34 cfg+: {
35 smsgw+: {
36 secret+: {
37 twilio_token: std.base64(std.split(importstr "secrets/plain/prod-twilio-token", "\n")[0]),
38 },
39 webhookFQDN: "smsgw-webhook-prod.hswaw.net",
Sergiusz Bazanski5b866622019-10-18 14:54:36 +020040 },
41 ldapweb+: {
Sergiusz Bazanski831a54a2019-10-20 17:38:22 +020042 webFQDN: "profile.hackerspace.pl",
Sergiusz Bazanski5b866622019-10-18 14:54:36 +020043 },
Sergiusz Bazanskic315aac2020-01-02 16:43:39 +010044 teleimg+: {
45 webFQDN: "teleimg.hswaw.net",
46 secret+: {
47 telegram_token: std.base64(std.split(importstr "secrets/plain/prod-telegram-token", "\n")[0]),
48 },
49 },
Sergiusz Bazanski64946962020-02-02 17:15:55 +010050 frab+: {
51 storageClassName: "waw-hdd-redundant-3",
52 webFQDN: "frab.hackerspace.pl",
53 secret+: {
54 secretKeyBase: std.base64(std.split(importstr "secrets/plain/prod-frab-smtp-password", "\n")[0]),
55 smtpPassword: std.base64(std.split(importstr "secrets/plain/prod-frab-secret-key-base", "\n")[0]),
56 },
57 },
Sergiusz Bazanski74818e12020-02-18 22:56:21 +010058 pretalx+: {
59 storageClassName: "waw-hdd-redundant-3",
60 webFQDN: "cfp.cebula.camp",
61 smtpPassword: std.base64(std.split(importstr "secrets/plain/prod-pretalx-smtp-password", "\n")[0]),
62 s3+: {
63 credsSecret: import "secrets/plain/prod-pretalx-s3.json",
64 },
65 },
Sergiusz Bazanski6f773e02019-10-02 20:46:48 +020066 },
67 },
68}