apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app.kubernetes.io/component: unrealengine
app.kubernetes.io/part-of: ue4-on-eks
app.kubernetes.io/version: 0.0.1
app: matchmaker
name: matchmaker
namespace: ue4
spec:
replicas: 1
selector:
matchLabels:
app: matchmaker
app.kubernetes.io/component: unrealengine
app.kubernetes.io/part-of: ue4-on-eks
app.kubernetes.io/version: 0.0.1
app: matchmaker
template:
metadata:
annotations:
sidecar.istio.io/rewriteAppHTTPProbers: "true"
labels:
app: matchmaker
app.kubernetes.io/component: unrealengine
app.kubernetes.io/part-of: ue4-on-eks
app.kubernetes.io/version: 0.0.1
spec:
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: app.pixel/turn
operator: In
values:
- "true"
containers:
- args:
- --HttpPort=3000
- --httpPort=3000
- --MatchmakerPort=9999
- --matchmakerPort=9999
env:
- name: STREAM_SERVICE_NAME
value: stream-discovery
- name: NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
envFrom:
- configMapRef:
name: pixel-app-configs
image: public.ecr.aws/i0s2o7q7/megaverse-eks-matchmaker:18
imagePullPolicy: Always
# livenessProbe:
# httpGet:
# path: /
# port: http
name: matchmaker
ports:
- containerPort: 3000
name: http
- containerPort: 9999
name: socket
- containerPort: 9000
name: metrics
protocol: TCP
# readinessProbe:
# httpGet:
# path: /
# port: http
resources:
limits:
cpu: 200m
memory: 200Mi
requests:
cpu: 100m
memory: 100Mi
securityContext:
capabilities:
add:
- NET_BIND_SERVICE
drop:
- all
readOnlyRootFilesystem: true
runAsNonRoot: true
runAsUser: 10001
volumeMounts:
- mountPath: /config
name: config
- mountPath: /pixelconfig
name: pixelconfig
initContainers:
- name: copy
image: busybox
# command: ["bash", "-c", "cp config/* /pixelconfig/"]
envFrom:
- configMapRef:
name: pixel-app-configs
volumeMounts:
- mountPath: /config
name: config
- mountPath: /pixelconfig
name: pixelconfig
volumes:
- configMap:
name: pixel-app-configs
name: config
- name: pixelconfig
emptyDir: {}
---
apiVersion: v1
kind: Service
metadata:
annotations:
prometheus.io/port: "9000"
prometheus.io/scrape: "true"
labels:
app: matchmaker
app.kubernetes.io/component: unrealengine
app.kubernetes.io/part-of: ue4-on-eks
app.kubernetes.io/version: 0.0.1
name: matchmaker
namespace: ue4
spec:
ports:
- name: http
port: 3000
targetPort: 3000
- name: socket
port: 9999
targetPort: 9999
- name: metrics
port: 9000
targetPort: 9000
selector:
app: matchmaker
sessionAffinity: ClientIP
sessionAffinityConfig:
clientIP:
timeoutSeconds: 10
type: ClusterIP
---
apiVersion: v1
kind: ConfigMap
metadata:
labels:
app.kubernetes.io/component: unrealengine
app.kubernetes.io/part-of: ue4-on-eks
app.kubernetes.io/version: 0.0.1
name: pixel-app-configs
namespace: ue4
data:
cirrus.json: "{\n\t\"UseFrontend\": false,\n\t\"UseMatchmaker\": false,\n\t\"UseHTTPS\":
false,\n\t\"UseAuthentication\": false,\n\t\"LogToFile\": false,\n\t\"EnableWebserver\":
false,\n\t\"HomepageFile\": null,\n\t\"HttpPort\": 3000,\n\t\"StreamerPort\":
8888\n}"
matchmaker.json: "{\n\t\"HttpPort\": 3000,\n\t\"UseHTTPS\": false,\n\t\"MatchmakerPort\":
9999,\n\t\"LogToFile\": false,\n \"enableRedirectionLinks\": false,\n \"enableRESTAPI\":
true\n}"