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