Nitter deployment
This commit is contained in:
parent
4f05052bd5
commit
b420e41a85
|
@ -21,5 +21,6 @@
|
||||||
(import ./conduit.nix)
|
(import ./conduit.nix)
|
||||||
(import ./irc.nix)
|
(import ./irc.nix)
|
||||||
(import ./netboot.nix)
|
(import ./netboot.nix)
|
||||||
|
(import ./nitter.nix)
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
94
homelab/nitter.nix
Normal file
94
homelab/nitter.nix
Normal file
|
@ -0,0 +1,94 @@
|
||||||
|
let
|
||||||
|
appName = "nitter";
|
||||||
|
nitterImage = "git.gmem.ca/arch/nitter:latest";
|
||||||
|
in
|
||||||
|
{
|
||||||
|
lib,
|
||||||
|
config,
|
||||||
|
kubenix,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
kubernetes.resources.services.nitter = {
|
||||||
|
spec = {
|
||||||
|
selector.app = appName;
|
||||||
|
ports.http = {
|
||||||
|
port = 8080;
|
||||||
|
targetPort = 8080;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
kubernetes.resources.deployments.nitter.spec = {
|
||||||
|
selector.matchLabels.app = appName;
|
||||||
|
template = {
|
||||||
|
metadata.labels.app = appName;
|
||||||
|
spec = {
|
||||||
|
volumes = {
|
||||||
|
config.configMap.name = "nitter";
|
||||||
|
accounts.secret.secretName = "nitter";
|
||||||
|
};
|
||||||
|
containers = {
|
||||||
|
nitter = {
|
||||||
|
image = nitterImage;
|
||||||
|
imagePullPolicy = "Always";
|
||||||
|
volumeMounts = [
|
||||||
|
{
|
||||||
|
name = "config";
|
||||||
|
mountPath = "/src/nitter.conf";
|
||||||
|
subPath = "nitter.conf";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
name = "accounts";
|
||||||
|
mountPath = "/src/guest_accounts.json";
|
||||||
|
subPath = "guest_accounts.json";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
ports.tlshttp.containerPort = 8080;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
kubernetes.helm.releases.nitter-redis = {
|
||||||
|
chart = kubenix.lib.helm.fetch {
|
||||||
|
repo = "https://charts.bitnami.com/bitnami";
|
||||||
|
chart = "redis";
|
||||||
|
version = "18.6.1";
|
||||||
|
sha256 = "CyvGHc1v1BtbzDx6hbbPah2uWpUhlNIUQowephT6hmM=";
|
||||||
|
};
|
||||||
|
values = {
|
||||||
|
auth.enabled = false;
|
||||||
|
architecture = "standalone";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
kubernetes.resources.ingresses.nitter = {
|
||||||
|
metadata = {
|
||||||
|
name = appName;
|
||||||
|
annotations = {
|
||||||
|
"cert-manager.io/issuer" = "le-issuer";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
spec = {
|
||||||
|
tls = [
|
||||||
|
{
|
||||||
|
hosts = ["nitter.gmem.ca"];
|
||||||
|
secretName = "gmem-ca-wildcard";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
rules = [
|
||||||
|
{
|
||||||
|
host = "nitter.gmem.ca";
|
||||||
|
http.paths = [
|
||||||
|
{
|
||||||
|
path = "/";
|
||||||
|
pathType = "Prefix";
|
||||||
|
backend.service = {
|
||||||
|
name = appName;
|
||||||
|
port.name = "http";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
];
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
Loading…
Reference in a new issue