blob: e30247b290e41349f423085841bab4e67fef372a [file] [log] [blame]
Sergiusz Bazanski5f2dc852019-04-02 02:36:22 +02001# toot.hackerspace.pl, a Mastodon instance.
2# This needs a secret provisioned, create with:
3# kubectl -n toot create secret generic mastodon --from-literal=postgres_password=$(pwgen 24 1)
4
5local kube = import "../../kube/kube.libsonnet";
6local postgres = import "../../kube/postgres.libsonnet";
7
8{
9 local app = self,
10 local cfg = app.cfg,
11 cfg:: {
12 namespace: "toot",
13 },
14
15 metadata(component):: {
16 namespace: app.cfg.namespace,
17 labels: {
18 "app.kubernetes.io/name": "toot",
19 "app.kubernetes.io/managed-by": "kubecfg",
20 "app.kubernetes.io/component": component,
21 },
22 },
23
24 namespace: kube.Namespace(app.cfg.namespace),
25
26 postgres: postgres {
27 cfg+: {
28 namespace: cfg.namespace,
29 appName: "toot",
30 database: "mastodon",
31 username: "mastodon",
32 password: { secretKeyRef: { name: "mastodon", key: "postgres_password" } },
33 },
34 },
35}