diff --git a/kubernetes/poketwo/gateway-proxy.nix b/kubernetes/poketwo/gateway-proxy.nix index b8fe6a5..4afbf23 100644 --- a/kubernetes/poketwo/gateway-proxy.nix +++ b/kubernetes/poketwo/gateway-proxy.nix @@ -1,7 +1,10 @@ +{ ... }: + { namespaces.poketwo = { resources = { "apps/v1".Deployment.gateway-proxy.spec = { + replicas = 1; selector.matchLabels.app = "gateway-proxy"; template = { metadata.labels.app = "gateway-proxy"; @@ -21,13 +24,14 @@ }; volumeMounts = [{ name = "config"; - mountPath = "/config.json"; - subPath = "config.json"; + mountPath = "/config"; }]; + env = [{ name = "CONFIG"; value = "/config/config.json"; }]; + envFrom = [{ secretRef = { name = "poketwo"; }; }]; }]; volumes = [{ name = "config"; - secret = { secretName = "gateway-proxy"; }; + configMap = { name = "gateway-proxy"; }; }]; imagePullSecrets = [{ name = "ghcr-auth"; }]; }; @@ -39,8 +43,35 @@ ports = [{ port = 7878; }]; }; - v1.Secret.gateway-proxy.stringData = { - "config.json" = ""; + v1.Secret.poketwo.stringData = { + "TOKEN" = ""; + }; + + v1.ConfigMap.gateway-proxy.data = { + "config.json" = builtins.toJSON { + log_level = "info"; + shards = 1600; + intents = 32509; + port = 7878; + activity = { type = 0; name = "@Pokétwo help"; }; + status = "online"; + backpressure = 100; + validate_token = true; + externally_accessible_url = "ws://gateway-proxy.poketwo.svc.cluster.local:7878"; + cache = { + channels = true; + presences = false; + emojis = false; + current_member = true; + members = false; + roles = true; + scheduled_events = false; + stage_instances = false; + stickers = false; + users = true; + voice_states = false; + }; + }; }; }; };