Skip to content

Commit

Permalink
Initial attempt at k8s
Browse files Browse the repository at this point in the history
Requires more work to syncronize everything. Maybe setting up
several dedicated proxy containers might be useful (for load
balancing and TLS handling).

This could possibly use something like Redis as a datastore and
KubeMQ for pubsub.
  • Loading branch information
tcyrus committed Sep 21, 2020
1 parent 5c6c1f2 commit 994211e
Show file tree
Hide file tree
Showing 2 changed files with 58 additions and 0 deletions.
35 changes: 35 additions & 0 deletions k8s/app-deployment.yaml
@@ -0,0 +1,35 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: syncplay-srv
labels:
app: syncplay-srv
spec:
replicas: 1
selector:
matchLabels:
app: syncplay-srv
template:
metadata:
labels:
app: syncplay-srv
spec:
containers:
- name: syncplay-srv
image: weeb-poly/syncplay-srv
env:
- name: SYNCPLAY_PORT
value: "8995"
- name: SYNCPLAY_PASSWORD
valueFrom:
secretKeyRef:
name: syncplay
key: password
- name: SYNCPLAY_SALT
valueFrom:
secretKeyRef:
name: syncplay
key: salt
ports:
- containerPort: 8995
restartPolicy: Always
23 changes: 23 additions & 0 deletions k8s/app-service.yaml
@@ -0,0 +1,23 @@
apiVersion: v1
kind: Service
metadata:
name: syncplay-srv
spec:
selector:
app: syncplay-srv
ports:
- port: 8995
protocol: TCP
targetPort: 8995
- port: 8996
protocol: TCP
targetPort: 8995
- port: 8997
protocol: TCP
targetPort: 8995
- port: 8998
protocol: TCP
targetPort: 8995
- port: 8999
protocol: TCP
targetPort: 8995

0 comments on commit 994211e

Please sign in to comment.