blob: c823be2185bd1a1dd0bce2ea977f99c236e7e8a7 [file] [log] [blame]
# toot.hackerspace.pl, a Mastodon instance.
# This needs a secret provisioned, create with:
# kubectl -n toot create secret generic mastodon --from-literal=postgres_password=$(pwgen 24 1)
local kube = import "../../kube/kube.libsonnet";
local postgres = import "../../kube/postgres.libsonnet";
local redis = import "../../kube/redis.libsonnet";
{
local app = self,
local cfg = app.cfg,
cfg:: {
namespace: "toot",
},
metadata(component):: {
namespace: app.cfg.namespace,
labels: {
"app.kubernetes.io/name": "toot",
"app.kubernetes.io/managed-by": "kubecfg",
"app.kubernetes.io/component": component,
},
},
namespace: kube.Namespace(app.cfg.namespace),
postgres: postgres {
cfg+: {
namespace: cfg.namespace,
appName: "toot",
database: "mastodon",
username: "mastodon",
password: { secretKeyRef: { name: "mastodon", key: "postgres_password" } },
},
},
redis: redis {
cfg+: {
namespace: cfg.namespace,
appName: "toot",
},
},
}