Skip to content

Commit

Permalink
Add faf-policy-server
Browse files Browse the repository at this point in the history
  • Loading branch information
Brutus5000 committed Apr 14, 2024
1 parent c4de16e commit 66b8346
Show file tree
Hide file tree
Showing 4 changed files with 73 additions and 0 deletions.
3 changes: 3 additions & 0 deletions apps/faf-policy-server/Chart.yaml
@@ -0,0 +1,3 @@
apiVersion: v2
name: faf-policy-server
version: 1.0.0
14 changes: 14 additions & 0 deletions apps/faf-policy-server/templates/config.yaml
@@ -0,0 +1,14 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: faf-policy-server
labels:
app: faf-policy-server
data:
APP_PORT: "8097"
DATABASE_HOST: "mariadb"
DATABASE_PORT: "3306"
DATABASE_USER: "faf-policy-server"
DATABASE_NAME: "faf_lobby"
# Since the application isn't structured correctly yet, this is required to find the 'verifier'
PYTHONPATH: "."
44 changes: 44 additions & 0 deletions apps/faf-policy-server/templates/deployment.yaml
@@ -0,0 +1,44 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: faf-policy-server
labels:
app: faf-policy-server
annotations:
reloader.stakater.com/auto: "true"
spec:
replicas: 1
revisionHistoryLimit: 10
selector:
matchLabels:
app: faf-policy-server
template:
metadata:
labels:
app: faf-policy-server
spec:
initContainers:
- name: load-uid-verifier
image: alpine/git
command: [ 'sh', '-c', 'git clone https://$GITHUB_USER:$GITHUB_TOKEN@github.com/FAForever/uid-verifier.git /tmp/uid-verifier && mv /tmp/uid-verifier/verifier/* /app/verifier' ]
envFrom:
- secretRef:
name: faf-policy-server
volumeMounts:
- mountPath: /app/verifier
name: uid-verifier
containers:
- image: faforever/faf-policy-server:v1.22
imagePullPolicy: Always
name: faf-policy-server
envFrom:
- configMapRef:
name: faf-policy-server
- secretRef:
name: faf-policy-server
volumeMounts:
- mountPath: /app/verifier
name: uid-verifier
volumes:
- name: uid-verifier
emptyDir: {}
12 changes: 12 additions & 0 deletions apps/faf-policy-server/templates/service.yaml
@@ -0,0 +1,12 @@
apiVersion: v1
kind: Service
metadata:
name: faf-policy-server
labels:
app: faf-policy-server
spec:
selector:
app: faf-policy-server
ports:
- port: 80
targetPort: 8097

0 comments on commit 66b8346

Please sign in to comment.