Initial setup

This commit is contained in:
Jan Funke 2025-12-13 19:48:40 +01:00
commit 1639523d6b
No known key found for this signature in database
6 changed files with 158 additions and 0 deletions

16
README.md Normal file
View File

@ -0,0 +1,16 @@
# Teamspeak 3 Server Quadlet configuration
This repository contains a Teamspeak 3 Server Quadlet configuration.
## Components
- Teamspeak 3 Server
- Postgresql Server
## Ports
| Port | Protocol | Description | Optional |
| ----: | :------: | ---------------------------------------------------------------- | :------: |
| 9987 | UDP | Voice traffic (default Teamspeak voice port) | No |
| 30033 | TCP | File transfer port (file uploads/downloads) | No |
| 10011 | TCP | ServerQuery (raw/Telnet) — remote administration via ServerQuery | Yes |
| 10022 | TCP | ServerQuery over SSH — alternative secure ServerQuery access | Yes |

9
config.map.tmpl Normal file
View File

@ -0,0 +1,9 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: ts3-config
data:
timezone: "Europe/Berlin"
database-name: "ts3"
database-user: "ts3"
query-protocols: "raw,ssh"

7
secrets.yml.tmpl Normal file
View File

@ -0,0 +1,7 @@
apiVersion: v1
kind: Secret
metadata:
name: ts3-secrets
type: Opaque
data:
database-password: CHANGE-ME-TO-SOMETHING-GOOD

21
ts3server.kube Normal file
View File

@ -0,0 +1,21 @@
[Unit]
Description=Teamspeak 3 Server (Pod)
After=network-online.target
[Kube]
Yaml=ts3server.yml
AutoUpdate=registry
ConfigMap=config.map
PublishPort=9987:9987
PublishPort=10011:10011
PublishPort=10022:10022
PublishPort=30033:30033
[Service]
Restart=always
RestartSec=15
[Install]
WantedBy=default.target

13
ts3server.xml Normal file
View File

@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<service>
<short>Teamspeak 3 Server</short>
<description>Firewall rules for the Teamspeak 3 Server</description>
<!-- Voice Port -->
<port protocol="udp" port="9987" />
<!-- File Transfer Port -->
<port protocol="tcp" port="30033" />
<!-- Optional Server Query (RAW) -->
<!-- <port protocol="tcp" port="10011" /> -->
<!-- Optional Server Query (SSH) -->
<!-- <port protocol="tcp" port="10022" /> -->
</service>

92
ts3server.yml Normal file
View File

@ -0,0 +1,92 @@
apiVersion: v1
kind: Pod
metadata:
name: ts3
spec:
restartPolicy: Always
containers:
# --- TeamSpeak 3 Server ---
- name: ts3server
image: docker.io/teamspeak:latest
ports:
- containerPort: 9987
protocol: UDP
- containerPort: 10011
protocol: TCP
- containerPort: 10022
protocol: TCP
- containerPort: 30033
protocol: TCP
env:
# General Configuration
- name: TZ
valueFrom:
configMapKeyRef:
name: ts3-config
key: timezone
# Teamspeak Config
- name: TS3SERVER_LICENSE
value: "accept"
- name: TS3SERVER_QUERY_PROTOCOLS
value: "ssh,raw"
# Database Configuration
- name: TS3SERVER_DB_PLUGIN
value: "ts3db_postgres"
- name: TS3SERVER_DB_SQLCREATEPATH
value: "create_postgres"
- name: TS3SERVER_DB_WAITUNTILREADY
value: 30
- name: TS3SERVER_DB_HOST
value: "localhost"
- name: TS3SERVER_DB_NAME
valueFrom:
configMapKeyRef:
name: ts3-config
key: database-name
- name: TS3SERVER_DB_USER
valueFrom:
configMapKeyRef:
name: ts3-config
key: database-user
- name: TS3SERVER_DB_PASSWORD
valueFrom:
secretKeyRef:
name: ts3-secrets
key: database-password
volumeMounts:
- mountPath: /var/ts3server
name: ts3-server-data
# --- Postgres Database ---
- name: ts3-db
image: docker.io/postgres:18
env:
# Database Configuration
- name: POSTGRES_DB
valueFrom:
configMapKeyRef:
name: ts3-config
key: database-name
- name: POSTGRES_USER
valueFrom:
configMapKeyRef:
name: ts3-config
key: database-user
- name: POSTGRES_PASSWORD
valueFrom:
secretKeyRef:
name: addy.io-secrets
key: database-password
volumeMounts:
- mountPath: /var/lib/postgresql
name: ts3-db-data
# --- Volume Definitions ---
volumes:
- name: ts3-server-data
persistentVolumeClaim:
claimName: ts3-server-data
- name: ts3-db-data
persistentVolumeClaim:
claimName: ts3-db-data