This commit is contained in:
parent
40a8e1aa0d
commit
e3c43d9ade
|
@ -8,5 +8,6 @@
|
||||||
(import ./immich.nix)
|
(import ./immich.nix)
|
||||||
(import ./endpoints.nix)
|
(import ./endpoints.nix)
|
||||||
(import ./homepage.nix)
|
(import ./homepage.nix)
|
||||||
|
(import ./pterodactyl.nix)
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,6 +24,12 @@ spec:
|
||||||
shared_preload_libraries: vectors
|
shared_preload_libraries: vectors
|
||||||
backups:
|
backups:
|
||||||
pgbackrest:
|
pgbackrest:
|
||||||
|
restore:
|
||||||
|
enabled: true
|
||||||
|
repoName: repo1
|
||||||
|
options:
|
||||||
|
- --type=time
|
||||||
|
- --target="2023-12-16 00:00:00-00"
|
||||||
manual:
|
manual:
|
||||||
repoName: repo1
|
repoName: repo1
|
||||||
options:
|
options:
|
||||||
|
@ -56,6 +62,9 @@ spec:
|
||||||
- name: immich
|
- name: immich
|
||||||
databases:
|
databases:
|
||||||
- immich
|
- immich
|
||||||
|
- name: pterodactyl
|
||||||
|
databases:
|
||||||
|
- pterodactyl
|
||||||
---
|
---
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: ConfigMap
|
kind: ConfigMap
|
||||||
|
@ -68,6 +77,8 @@ data:
|
||||||
\c immich
|
\c immich
|
||||||
GRANT CREATE ON SCHEMA public TO "immich";
|
GRANT CREATE ON SCHEMA public TO "immich";
|
||||||
CREATE EXTENSION vectors;
|
CREATE EXTENSION vectors;
|
||||||
|
\c pterodactyl
|
||||||
|
GRANT CREATE ON SCHEMA public TO "pterodactyl";
|
||||||
---
|
---
|
||||||
apiVersion: monitoring.coreos.com/v1
|
apiVersion: monitoring.coreos.com/v1
|
||||||
kind: PodMonitor
|
kind: PodMonitor
|
||||||
|
|
86
homelab/pterodactyl.nix
Normal file
86
homelab/pterodactyl.nix
Normal file
|
@ -0,0 +1,86 @@
|
||||||
|
let
|
||||||
|
appName = "pterodactyl-panel";
|
||||||
|
pterodactyl-panel-Image = "git.gmem.ca/arch/pterodactyl-panel:latest";
|
||||||
|
in
|
||||||
|
{ lib, config, kubenix, ... }: {
|
||||||
|
kubernetes.resources.services.pterodactyl-panel = {
|
||||||
|
spec = {
|
||||||
|
selector.app = appName;
|
||||||
|
ports.http = {
|
||||||
|
port = 8080;
|
||||||
|
targetPort = 8080;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
kubernetes.resources.statefulSets.pterodactyl-panel.spec = {
|
||||||
|
selector.matchLabels.app = appName;
|
||||||
|
serviceName = appName;
|
||||||
|
template = {
|
||||||
|
metadata.labels.app = appName;
|
||||||
|
spec = {
|
||||||
|
volumes = {
|
||||||
|
secret.secret.secretName = "pterodactyl";
|
||||||
|
};
|
||||||
|
containers = {
|
||||||
|
pterodactyl-panel = {
|
||||||
|
image = pterodactyl-panel-Image;
|
||||||
|
imagePullPolicy = "Always";
|
||||||
|
ports.http.containerPort = 8080;
|
||||||
|
lifecycle.postStart.exec.command = [
|
||||||
|
"/bin/sh" "-c"
|
||||||
|
"cp /var/secret/pterodactyl.env /var/www/pterodactyl/.env"
|
||||||
|
];
|
||||||
|
volumeMounts = [
|
||||||
|
{ name = "secret"; mountPath = "/var/secret"; }
|
||||||
|
{ name = "data"; mountPath = "/var/www/pterodactyl/storage/app"; }
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
volumeClaimTemplates = [
|
||||||
|
{ metadata.name = "data";
|
||||||
|
spec = {
|
||||||
|
storageClassName = "nfs-client";
|
||||||
|
accessModes = [ "ReadWriteOnce" ];
|
||||||
|
resources.requests.storage = "1Gi";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
kubernetes.helm.releases.pterodactyl-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.pterodactyl-panel = {
|
||||||
|
metadata = {
|
||||||
|
name = appName;
|
||||||
|
annotations = {
|
||||||
|
"cert-manager.io/issuer" = "le-issuer";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
spec = {
|
||||||
|
tls = [ { hosts = [ "games.gmem.ca" ]; secretName = "gmem-ca-wildcard"; } ];
|
||||||
|
rules = [
|
||||||
|
{
|
||||||
|
host = "games.gmem.ca";
|
||||||
|
http.paths = [
|
||||||
|
{ path = "/"; pathType = "Prefix";
|
||||||
|
backend.service = {
|
||||||
|
name = appName;
|
||||||
|
port.name = "http"; };
|
||||||
|
}
|
||||||
|
];
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
Loading…
Reference in a new issue