Skip to content

Commit

Permalink
feat: vrising
Browse files Browse the repository at this point in the history
  • Loading branch information
joryirving committed Jan 4, 2025
1 parent c191b1d commit a0f8b8a
Show file tree
Hide file tree
Showing 7 changed files with 177 additions and 0 deletions.
1 change: 1 addition & 0 deletions kubernetes/main/apps/games/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ resources:
# - ./core-keeper/ks.yaml
- ./minecraft/ks.yaml
# - ./palworld/ks.yaml
- ./vrising/ks.yaml
14 changes: 14 additions & 0 deletions kubernetes/main/apps/games/vrising/app/dnsendpoint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
# yaml-language-server: $schema=https://kube-schemas.pages.dev/externaldns.k8s.io/dnsendpoint_v1alpha1.json
apiVersion: externaldns.k8s.io/v1alpha1
kind: DNSEndpoint
metadata:
name: vrising
spec:
endpoints:
- dnsName: "vrising.${SECRET_DOMAIN}"
recordType: CNAME
targets: ["ipv4.${SECRET_DOMAIN}"]
providerSpecific:
- name: external-dns.alpha.kubernetes.io/cloudflare-proxied
value: 'false'
24 changes: 24 additions & 0 deletions kubernetes/main/apps/games/vrising/app/externalsecret.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
# yaml-language-server: $schema=https://kube-schemas.pages.dev/external-secrets.io/externalsecret_v1beta1.json
apiVersion: external-secrets.io/v1beta1
kind: ExternalSecret
metadata:
name: &name vrising-secret
spec:
secretStoreRef:
kind: ClusterSecretStore
name: onepassword-connect
target:
name: *name
template:
engineVersion: v2
data:
VR_PASSWORD: "{{ .VR_PASSWORD }}"
VR_SERVER_NAME: "{{ .VR_SERVER_NAME }}"
VR_LOWER_FPS_WHEN_EMPTY: "{{ .VR_LOWER_FPS_WHEN_EMPTY }}"
VR_SECURE: "{{ .VR_SECURE }}"
VR_DIFFICULTY_PRESET: "{{ .VR_DIFFICULTY_PRESET }}"
SERVERNAME: "{{ .VR_SERVER_NAME }}"
dataFrom:
- extract:
key: vrising
93 changes: 93 additions & 0 deletions kubernetes/main/apps/games/vrising/app/helmrelease.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
# yaml-language-server: $schema=https://raw.githubusercontent.com/bjw-s/helm-charts/main/charts/other/app-template/schemas/helmrelease-helm-v2.schema.json
apiVersion: helm.toolkit.fluxcd.io/v2
kind: HelmRelease
metadata:
name: &app vrising
spec:
interval: 30m
chart:
spec:
chart: app-template
version: 3.6.0
sourceRef:
kind: HelmRepository
name: bjw-s
namespace: flux-system
install:
remediation:
retries: 3
upgrade:
cleanupOnFail: true
remediation:
strategy: rollback
retries: 3
dependsOn:
- name: rook-ceph-cluster
namespace: rook-ceph
- name: volsync
namespace: storage
values:
controllers:
vrising:
annotations:
reloader.stakater.com/auto: "true"
containers:
app:
image:
repository: trueosiris/vrising
tag: 2.1
env:
## Container Settings
TZ: ${TIMEZONE}
SERVERNAME: "Smurf-VRising"
GAMEPORT: &game 9876
QUERYPORT: &query 9877
MAX_USERS: 4
MAX_ADMIN: 2
# envFrom:
# - secretRef:
# name: vrising-secret
probes:
liveness:
enabled: false
readiness:
enabled: false
startup:
enabled: false
resources:
requests:
cpu: 1
limits:
memory: 10Gi
defaultPodOptions:
securityContext:
runAsNonRoot: true
runAsUser: 1000
runAsGroup: 1000
fsGroup: 1000
fsGroupChangePolicy: OnRootMismatch
seccompProfile: { type: RuntimeDefault }
service:
app:
controller: *app
type: LoadBalancer
annotations:
lbipam.cilium.io/ips: ${SVC_VRISING_ADDR:=temp}
ports:
game:
enabled: true
port: *game
protocol: UDP
query:
enabled: true
port: *query
protocol: UDP
persistence:
config:
existingClaim: *app
globalMounts:
- path: /mnt/vrising/persistentdata
server:
existingClaim: vrising-server-files
globalMounts:
- path: /mnt/vrising/server
9 changes: 9 additions & 0 deletions kubernetes/main/apps/games/vrising/app/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# yaml-language-server: $schema=https://json.schemastore.org/kustomization
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- ./dnsendpoint.yaml
# - ./externalsecret.yaml
- ./helmrelease.yaml
- ./pvc.yaml
- ../../../../../shared/templates/volsync
11 changes: 11 additions & 0 deletions kubernetes/main/apps/games/vrising/app/pvc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: vrising-server-files
spec:
accessModes: ["ReadWriteOnce"]
resources:
requests:
storage: 5Gi
storageClassName: ceph-block
25 changes: 25 additions & 0 deletions kubernetes/main/apps/games/vrising/ks.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# yaml-language-server: $schema=https://kube-schemas.pages.dev/kustomize.toolkit.fluxcd.io/kustomization_v1.json
apiVersion: kustomize.toolkit.fluxcd.io/v1
kind: Kustomization
metadata:
name: &app vrising
namespace: flux-system
spec:
targetNamespace: games
commonMetadata:
labels:
app.kubernetes.io/name: *app
path: ./kubernetes/main/apps/games/vrising/app
prune: true
sourceRef:
kind: GitRepository
name: home-kubernetes
wait: false # no flux ks dependents
interval: 30m
timeout: 5m
postBuild:
substitute:
APP: *app
VOLSYNC_CAPACITY: 50Gi
VOLSYNC_UID: "1000"
VOLSYNC_GID: "1000"

0 comments on commit a0f8b8a

Please sign in to comment.