hscloud/devtools/kube/prod.jsonnet
Sergiusz Bazanski 91e1a8c9c5 devtools: add sourcegraph
Change-Id: Ic3c40768c761e598e0f42b17a4b9f0d4ebcb2bb2
2020-06-25 12:27:34 +02:00

37 lines
1.2 KiB
Text

local mirko = import "../../kube/mirko.libsonnet";
local policies = import "../../kube/policies.libsonnet";
local depotview = import "depotview.libsonnet";
local hackdoc = import "hackdoc.libsonnet";
local sourcegraph = import "sourcegraph.libsonnet";
{
devtools(name):: mirko.Environment(name) {
local env = self,
local cfg = self.cfg,
cfg+: {
depotview: depotview.cfg,
hackdoc: hackdoc.cfg {
publicFQDN: "hackdoc.hackerspace.pl",
},
sourcegraph: sourcegraph.cfg {
publicFQDN: "cs.hackerspace.pl",
},
},
components: {
depotview: depotview.component(cfg.depotview, env),
hackdoc: hackdoc.component(cfg.hackdoc, env),
// This is configurated manually through the web interface, q3k has an account
// and can create more administrative ones if needed.
sourcegraph: sourcegraph.component(cfg.sourcegraph, env),
},
},
prod: self.devtools("devtools-prod") {
local env = self,
// For SourceGraph's tini container mess.
policy: policies.AllowNamespaceMostlySecure(env.cfg.namespace),
},
}