From 2244bc6c0d7f3346d7e1da8db1125ccfc96df6a7 Mon Sep 17 00:00:00 2001 From: Tamipes Date: Wed, 3 Jun 2026 15:44:42 +0200 Subject: [PATCH] wip 3 --- kube/roles.yaml | 52 +++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 50 insertions(+), 2 deletions(-) diff --git a/kube/roles.yaml b/kube/roles.yaml index 409c52e..efa3f25 100644 --- a/kube/roles.yaml +++ b/kube/roles.yaml @@ -1,3 +1,9 @@ +apiVersion: v1 +kind: ServiceAccount +metadata: + name: minecraft-ingress + namespace: default +--- apiVersion: rbac.authorization.k8s.io/v1 kind: Role metadata: @@ -6,7 +12,21 @@ metadata: rules: - apiGroups: [""] # "" indicates the core API group resources: ["pods","deployments","services"] - verbs: ["get", "list"] + verbs: ["get", "list", "patch", "watch"] +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: RoleBinding +metadata: + name: minecraft-ingress + namespace: default +subjects: +- kind: ServiceAccount + name: minecraft-ingress + namespace: default +roleRef: + kind: Role + name: minecraft-ingress + apiGroup: rbac.authorization.k8s.io --- apiVersion: apps/v1 kind: Deployment @@ -17,4 +37,32 @@ metadata: spec: replicas: 1 selector: - matchLabels + matchLabels: + app: minecraft-ingress + template: + metadata: + labels: + app: minecraft-ingress + spec: + serviceAccountName: minecraft-ingress + containers: + - name: minecraft-ingress + image: git.tami.moe/tamipes/minecraft-ingress:latest + env: + - name: FILTER_CONN + value: '(addr == "87.229.85.222") || (addr == "") || (addr == "ogmur.xyz") || (addr == "@mat:matdoes.dev (hi honeypots) ") || (addr == "@mat:matdoes.dev ") || (addr == "slowstack.tv")' +--- +apiVersion: v1 +kind: Service +metadata: + name: minecraft-ingress + labels: + app: minecraft-ingress +spec: + ports: + - name: minecraft-ingress + port: 25565 + nodePort: 30565 + selector: + server: minecraft-ingress + type: NodePort