Add factorio game server
This commit is contained in:
parent
983a15e982
commit
ef95e10b97
|
@ -0,0 +1,67 @@
|
|||
apiVersion: helm.toolkit.fluxcd.io/v2beta1
|
||||
kind: HelmRelease
|
||||
metadata:
|
||||
name: factorio
|
||||
namespace: game-server
|
||||
spec:
|
||||
interval: 5m
|
||||
chart:
|
||||
spec:
|
||||
chart: app-template
|
||||
version: 1.3.x
|
||||
sourceRef:
|
||||
kind: HelmRepository
|
||||
name: bjws-charts
|
||||
namespace: flux-system
|
||||
|
||||
values:
|
||||
image:
|
||||
repository: factoriotools/factorio
|
||||
tag: latest
|
||||
|
||||
service:
|
||||
main:
|
||||
ports:
|
||||
http:
|
||||
enabled: false
|
||||
|
||||
game:
|
||||
enabled: true
|
||||
primary: true
|
||||
port: 34197
|
||||
targetPort: 34197
|
||||
protocol: UDP
|
||||
|
||||
probes:
|
||||
liveness:
|
||||
enabled: false
|
||||
|
||||
ingress:
|
||||
main:
|
||||
enabled: true
|
||||
annotations:
|
||||
traefik.ingress.kubernetes.io/router.entrypoints: factorio
|
||||
hosts:
|
||||
- host: &host "fact.${SECRET_NEW_DOMAIN}"
|
||||
paths:
|
||||
- path: /
|
||||
pathType: Prefix
|
||||
service:
|
||||
port:
|
||||
name: game
|
||||
|
||||
persistence:
|
||||
data:
|
||||
enabled: true
|
||||
type: hostPath
|
||||
hostPath: /mnt/MainPool/Kubernetes/cdn
|
||||
readOnly: true
|
||||
mountPath: /data
|
||||
config:
|
||||
enabled: true
|
||||
type: configMap
|
||||
name: nginx-cdn-configmap
|
||||
|
||||
resources:
|
||||
requests:
|
||||
cpu: 1m
|
|
@ -0,0 +1,4 @@
|
|||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
resources:
|
||||
- ./helm-release.yaml
|
|
@ -0,0 +1,6 @@
|
|||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
resources:
|
||||
- ./namespace.yaml
|
||||
- ./network_policy.yaml
|
||||
- ./factorio
|
|
@ -0,0 +1,6 @@
|
|||
apiVersion: v1
|
||||
kind: Namespace
|
||||
metadata:
|
||||
name: game-servers
|
||||
labels:
|
||||
name: game-servers
|
|
@ -0,0 +1,25 @@
|
|||
apiVersion: networking.k8s.io/v1
|
||||
kind: NetworkPolicy
|
||||
metadata:
|
||||
name: deny-most-allow-some
|
||||
namespace: game-servers
|
||||
spec:
|
||||
# Apply to all pods in this namespace
|
||||
podSelector: {}
|
||||
ingress:
|
||||
- from:
|
||||
# Allow all pods in this namespace
|
||||
- namespaceSelector:
|
||||
matchLabels:
|
||||
name: "game-servers"
|
||||
# - podSelector: {}
|
||||
|
||||
# Allow traefik pods
|
||||
- namespaceSelector:
|
||||
matchLabels:
|
||||
name: "traefik"
|
||||
|
||||
# Allow all pods with this label
|
||||
- podSelector:
|
||||
matchLabels:
|
||||
needsGameServers: "yes"
|
|
@ -10,4 +10,5 @@ resources:
|
|||
- ./irc
|
||||
- ./monitoring
|
||||
- ./default
|
||||
- ./game-servers
|
||||
#- ./harbor
|
|
@ -17,6 +17,7 @@ spec:
|
|||
values:
|
||||
additionalArguments:
|
||||
- --api.insecure
|
||||
- --entryPoints.factorio.address=:34197/udp
|
||||
|
||||
logs:
|
||||
general:
|
||||
|
|
Loading…
Reference in New Issue