mirror of
https://github.com/jcreek/CosmicClash.git
synced 2026-09-10 16:04:04 +00:00
84 lines
2.4 KiB
YAML
84 lines
2.4 KiB
YAML
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: allocator
|
|
namespace: cosmic-clash
|
|
labels:
|
|
app.kubernetes.io/name: allocator
|
|
app.kubernetes.io/component: allocator
|
|
spec:
|
|
replicas: 2
|
|
strategy:
|
|
type: RollingUpdate
|
|
rollingUpdate:
|
|
maxUnavailable: 0
|
|
maxSurge: 1
|
|
selector:
|
|
matchLabels:
|
|
app.kubernetes.io/name: allocator
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app.kubernetes.io/name: allocator
|
|
app.kubernetes.io/component: allocator
|
|
spec:
|
|
terminationGracePeriodSeconds: 10
|
|
serviceAccountName: allocator
|
|
automountServiceAccountToken: false
|
|
securityContext:
|
|
runAsNonRoot: true
|
|
runAsUser: 10001
|
|
runAsGroup: 10001
|
|
seccompProfile:
|
|
type: RuntimeDefault
|
|
containers:
|
|
- name: allocator
|
|
image: ghcr.io/cosmic-clash/allocator@sha256:0000000000000000000000000000000000000000000000000000000000000000
|
|
args:
|
|
- --dsn=$(COSMIC_CLASH_POSTGRES_DSN)
|
|
- --agones-url=https://agones-allocator.agones-system.svc.cluster.local
|
|
- --agones-namespace=cosmic-clash
|
|
- --metrics-addr=:9091
|
|
ports:
|
|
- name: metrics
|
|
containerPort: 9091
|
|
readinessProbe:
|
|
httpGet:
|
|
path: /metrics
|
|
port: metrics
|
|
initialDelaySeconds: 2
|
|
periodSeconds: 5
|
|
timeoutSeconds: 2
|
|
failureThreshold: 3
|
|
livenessProbe:
|
|
httpGet:
|
|
path: /metrics
|
|
port: metrics
|
|
initialDelaySeconds: 10
|
|
periodSeconds: 10
|
|
timeoutSeconds: 2
|
|
failureThreshold: 3
|
|
securityContext:
|
|
allowPrivilegeEscalation: false
|
|
readOnlyRootFilesystem: true
|
|
capabilities:
|
|
drop: [ALL]
|
|
resources:
|
|
requests:
|
|
cpu: 100m
|
|
memory: 128Mi
|
|
limits:
|
|
cpu: 1
|
|
memory: 512Mi
|
|
env:
|
|
- name: COSMIC_CLASH_POSTGRES_DSN
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: cosmic-clash-database
|
|
key: dsn
|
|
- name: COSMIC_CLASH_WORKLOAD_SECRET
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: cosmic-clash-workload
|
|
key: secret
|