blob: 3bdccd222f09afe9185567b2eccef5763ade2f43 [file] [log] [blame]
Sergiusz Bazanski74808792020-04-13 01:28:09 +02001local mirko = import "../../kube/mirko.libsonnet";
Sergiusz Bazanski91e1a8c2020-06-25 12:16:29 +02002local policies = import "../../kube/policies.libsonnet";
Sergiusz Bazanski74808792020-04-13 01:28:09 +02003
4local depotview = import "depotview.libsonnet";
5local hackdoc = import "hackdoc.libsonnet";
Sergiusz Bazanski91e1a8c2020-06-25 12:16:29 +02006local sourcegraph = import "sourcegraph.libsonnet";
Sergiusz Bazanski74808792020-04-13 01:28:09 +02007
8{
9 devtools(name):: mirko.Environment(name) {
10 local env = self,
11 local cfg = self.cfg,
12
13 cfg+: {
14 depotview: depotview.cfg,
15 hackdoc: hackdoc.cfg {
16 publicFQDN: "hackdoc.hackerspace.pl",
17 },
Sergiusz Bazanski91e1a8c2020-06-25 12:16:29 +020018 sourcegraph: sourcegraph.cfg {
19 publicFQDN: "cs.hackerspace.pl",
20 },
Sergiusz Bazanski74808792020-04-13 01:28:09 +020021 },
22
23 components: {
24 depotview: depotview.component(cfg.depotview, env),
25 hackdoc: hackdoc.component(cfg.hackdoc, env),
Sergiusz Bazanski91e1a8c2020-06-25 12:16:29 +020026 // This is configurated manually through the web interface, q3k has an account
27 // and can create more administrative ones if needed.
28 sourcegraph: sourcegraph.component(cfg.sourcegraph, env),
Sergiusz Bazanski74808792020-04-13 01:28:09 +020029 },
30 },
31
32 prod: self.devtools("devtools-prod") {
Sergiusz Bazanski91e1a8c2020-06-25 12:16:29 +020033 local env = self,
34 // For SourceGraph's tini container mess.
35 policy: policies.AllowNamespaceMostlySecure(env.cfg.namespace),
Sergiusz Bazanski74808792020-04-13 01:28:09 +020036 },
37}