2019-04-02 00:36:22 +00:00
|
|
|
# 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";
|
2019-04-04 14:53:53 +00:00
|
|
|
local redis = import "../../kube/redis.libsonnet";
|
2019-04-02 00:36:22 +00:00
|
|
|
|
|
|
|
{
|
|
|
|
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" } },
|
|
|
|
},
|
|
|
|
},
|
2019-04-04 14:53:53 +00:00
|
|
|
|
|
|
|
redis: redis {
|
|
|
|
cfg+: {
|
|
|
|
namespace: cfg.namespace,
|
|
|
|
appName: "toot",
|
|
|
|
},
|
|
|
|
},
|
2019-04-02 00:36:22 +00:00
|
|
|
}
|