Sergiusz Bazanski | 6f773e0 | 2019-10-02 20:46:48 +0200 | [diff] [blame] | 1 | local mirko = import "../../kube/mirko.libsonnet"; |
| 2 | local kube = import "../../kube/kube.libsonnet"; |
| 3 | |
Sergiusz Bazanski | d0ec2c6 | 2019-11-21 00:08:52 +0100 | [diff] [blame] | 4 | local smsgw = import "smsgw.libsonnet"; |
Sergiusz Bazanski | c315aac | 2020-01-02 16:43:39 +0100 | [diff] [blame] | 5 | local teleimg = import "teleimg.libsonnet"; |
Sergiusz Bazanski | 6494696 | 2020-02-02 17:15:55 +0100 | [diff] [blame] | 6 | local frab = import "frab.libsonnet"; |
Sergiusz Bazanski | 74818e1 | 2020-02-18 22:56:21 +0100 | [diff] [blame] | 7 | local pretalx = import "pretalx.libsonnet"; |
Serge Bazanski | 95ba05d | 2021-05-12 21:28:10 +0000 | [diff] [blame] | 8 | local cebulacamp = import "cebulacamp.libsonnet"; |
Serge Bazanski | 0aa2910 | 2023-04-01 23:18:05 +0000 | [diff] [blame] | 9 | local capacifier = import "capacifier.libsonnet"; |
Sergiusz Bazanski | d0ec2c6 | 2019-11-21 00:08:52 +0100 | [diff] [blame] | 10 | |
Sergiusz Bazanski | 6f773e0 | 2019-10-02 20:46:48 +0200 | [diff] [blame] | 11 | { |
| 12 | hswaw(name):: mirko.Environment(name) { |
| 13 | local env = self, |
| 14 | local cfg = self.cfg, |
| 15 | |
| 16 | cfg+: { |
Sergiusz Bazanski | d0ec2c6 | 2019-11-21 00:08:52 +0100 | [diff] [blame] | 17 | smsgw: smsgw.cfg, |
Sergiusz Bazanski | c315aac | 2020-01-02 16:43:39 +0100 | [diff] [blame] | 18 | teleimg: teleimg.cfg, |
Sergiusz Bazanski | 6494696 | 2020-02-02 17:15:55 +0100 | [diff] [blame] | 19 | frab: frab.cfg, |
Sergiusz Bazanski | 74818e1 | 2020-02-18 22:56:21 +0100 | [diff] [blame] | 20 | pretalx: pretalx.cfg, |
Serge Bazanski | 95ba05d | 2021-05-12 21:28:10 +0000 | [diff] [blame] | 21 | cebulacamp: cebulacamp.cfg, |
Serge Bazanski | 0aa2910 | 2023-04-01 23:18:05 +0000 | [diff] [blame] | 22 | capacifier: capacifier.cfg, |
Sergiusz Bazanski | 6f773e0 | 2019-10-02 20:46:48 +0200 | [diff] [blame] | 23 | }, |
| 24 | |
| 25 | components: { |
Sergiusz Bazanski | d0ec2c6 | 2019-11-21 00:08:52 +0100 | [diff] [blame] | 26 | smsgw: smsgw.component(cfg.smsgw, env), |
Sergiusz Bazanski | a885488 | 2020-01-05 00:34:38 +0100 | [diff] [blame] | 27 | teleimg: teleimg.teleimg(cfg.teleimg, env), |
| 28 | lelegram: teleimg.lelegram(cfg.teleimg, env), |
Sergiusz Bazanski | 6494696 | 2020-02-02 17:15:55 +0100 | [diff] [blame] | 29 | frab: frab.component(cfg.frab, env), |
Piotr Dobrowolski | 8e22f6c | 2023-05-10 22:20:13 +0200 | [diff] [blame] | 30 | pretalx: pretalx.component(cfg.pretalx, env) { |
| 31 | cronjob: null, |
| 32 | }, |
Serge Bazanski | 95ba05d | 2021-05-12 21:28:10 +0000 | [diff] [blame] | 33 | cebulacamp: cebulacamp.component(cfg.cebulacamp, env), |
Serge Bazanski | 0aa2910 | 2023-04-01 23:18:05 +0000 | [diff] [blame] | 34 | capacifier: capacifier.component(cfg.capacifier, env), |
Sergiusz Bazanski | 6f773e0 | 2019-10-02 20:46:48 +0200 | [diff] [blame] | 35 | }, |
| 36 | }, |
| 37 | |
| 38 | prod: self.hswaw("hswaw-prod") { |
| 39 | cfg+: { |
| 40 | smsgw+: { |
| 41 | secret+: { |
| 42 | twilio_token: std.base64(std.split(importstr "secrets/plain/prod-twilio-token", "\n")[0]), |
| 43 | }, |
| 44 | webhookFQDN: "smsgw-webhook-prod.hswaw.net", |
Sergiusz Bazanski | 5b86662 | 2019-10-18 14:54:36 +0200 | [diff] [blame] | 45 | }, |
Sergiusz Bazanski | c315aac | 2020-01-02 16:43:39 +0100 | [diff] [blame] | 46 | teleimg+: { |
| 47 | webFQDN: "teleimg.hswaw.net", |
| 48 | secret+: { |
| 49 | telegram_token: std.base64(std.split(importstr "secrets/plain/prod-telegram-token", "\n")[0]), |
| 50 | }, |
| 51 | }, |
Sergiusz Bazanski | 6494696 | 2020-02-02 17:15:55 +0100 | [diff] [blame] | 52 | frab+: { |
| 53 | storageClassName: "waw-hdd-redundant-3", |
| 54 | webFQDN: "frab.hackerspace.pl", |
| 55 | secret+: { |
| 56 | secretKeyBase: std.base64(std.split(importstr "secrets/plain/prod-frab-smtp-password", "\n")[0]), |
| 57 | smtpPassword: std.base64(std.split(importstr "secrets/plain/prod-frab-secret-key-base", "\n")[0]), |
| 58 | }, |
| 59 | }, |
Sergiusz Bazanski | 74818e1 | 2020-02-18 22:56:21 +0100 | [diff] [blame] | 60 | pretalx+: { |
| 61 | storageClassName: "waw-hdd-redundant-3", |
| 62 | webFQDN: "cfp.cebula.camp", |
| 63 | smtpPassword: std.base64(std.split(importstr "secrets/plain/prod-pretalx-smtp-password", "\n")[0]), |
| 64 | s3+: { |
| 65 | credsSecret: import "secrets/plain/prod-pretalx-s3.json", |
| 66 | }, |
| 67 | }, |
Serge Bazanski | 95ba05d | 2021-05-12 21:28:10 +0000 | [diff] [blame] | 68 | cebulacamp+: { |
| 69 | webFQDN: "cebula.camp", |
| 70 | }, |
Serge Bazanski | 0aa2910 | 2023-04-01 23:18:05 +0000 | [diff] [blame] | 71 | capacifier+: { |
Serge Bazanski | 88bec7a | 2023-09-22 22:09:24 +0000 | [diff] [blame] | 72 | ldapBindPassword: std.split(importstr "secrets/plain/prod-capacifier-password", "\n")[0], |
Serge Bazanski | 0aa2910 | 2023-04-01 23:18:05 +0000 | [diff] [blame] | 73 | }, |
Sergiusz Bazanski | 6f773e0 | 2019-10-02 20:46:48 +0200 | [diff] [blame] | 74 | }, |
| 75 | }, |
Serge Bazanski | 7459bbc | 2023-07-28 17:14:29 +0000 | [diff] [blame] | 76 | |
| 77 | admins: kube.RoleBinding("admins") { |
| 78 | metadata+: { |
| 79 | namespace: "hswaw-prod", |
| 80 | }, |
| 81 | roleRef: { |
| 82 | apiGroup: "rbac.authorization.k8s.io", |
| 83 | kind: "ClusterRole", |
| 84 | name: "system:admin-namespace", |
| 85 | }, |
| 86 | subjects: [ |
| 87 | kube.User("ar@hackerspace.pl"), |
Serge Bazanski | 603b4f7 | 2023-09-22 20:34:22 +0000 | [diff] [blame] | 88 | kube.User("radex@hackerspace.pl"), |
Serge Bazanski | 7459bbc | 2023-07-28 17:14:29 +0000 | [diff] [blame] | 89 | ], |
| 90 | }, |
Sergiusz Bazanski | 6f773e0 | 2019-10-02 20:46:48 +0200 | [diff] [blame] | 91 | } |