fitst version
This commit is contained in:
@@ -0,0 +1,57 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: turbo-race
|
||||
labels:
|
||||
app: turbo-race
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: turbo-race
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: turbo-race
|
||||
spec:
|
||||
containers:
|
||||
- name: turbo-race
|
||||
image: turbo-race:latest
|
||||
imagePullPolicy: IfNotPresent
|
||||
ports:
|
||||
- containerPort: 8080
|
||||
env:
|
||||
- name: PORT
|
||||
value: "8080"
|
||||
- name: MAX_PLAYERS
|
||||
value: "20"
|
||||
- name: COUNTDOWN_S
|
||||
value: "30"
|
||||
- name: RACE_DURATION_S
|
||||
value: "90"
|
||||
- name: TRACK_LENGTH
|
||||
value: "23000"
|
||||
- name: ADMIN_TOKEN
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: turbo-race-secret
|
||||
key: admin-token
|
||||
resources:
|
||||
requests:
|
||||
cpu: 100m
|
||||
memory: 64Mi
|
||||
limits:
|
||||
cpu: 300m
|
||||
memory: 160Mi
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /healthz
|
||||
port: 8080
|
||||
initialDelaySeconds: 3
|
||||
periodSeconds: 5
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /healthz
|
||||
port: 8080
|
||||
initialDelaySeconds: 5
|
||||
periodSeconds: 10
|
||||
@@ -0,0 +1,9 @@
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
resources:
|
||||
- deployment.yaml
|
||||
- service.yaml
|
||||
secretGenerator:
|
||||
- name: turbo-race-secret
|
||||
literals:
|
||||
- admin-token=b61e4bacba3998927b6d6fd2ee69b51cf7fee31c4370a5b0
|
||||
@@ -0,0 +1,15 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: turbo-race
|
||||
labels:
|
||||
app: turbo-race
|
||||
spec:
|
||||
selector:
|
||||
app: turbo-race
|
||||
type: NodePort
|
||||
ports:
|
||||
- name: http
|
||||
port: 8080
|
||||
targetPort: 8080
|
||||
nodePort: 30090
|
||||
@@ -0,0 +1,22 @@
|
||||
# Optionele Ingress - pas de host aan en zet in je kustomization resources
|
||||
# OF: kubectl apply -f k8s/ingress.yaml
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: turbo-race
|
||||
annotations:
|
||||
nginx.ingress.kubernetes.io/proxy-read-timeout: "3600"
|
||||
nginx.ingress.kubernetes.io/proxy-send-timeout: "3600"
|
||||
spec:
|
||||
ingressClassName: nginx
|
||||
rules:
|
||||
- host: race.voorbeeld.nl
|
||||
http:
|
||||
paths:
|
||||
- path: /
|
||||
pathType: Prefix
|
||||
backend:
|
||||
service:
|
||||
name: turbo-race
|
||||
port:
|
||||
name: http
|
||||
@@ -0,0 +1,12 @@
|
||||
# Lokale Kind-cluster-config voor Turbo Race.
|
||||
# Extra port-mapping zodat NodePort 30090 bereikbaar is als http://localhost:30090
|
||||
# Aanmaken (alleen nodig bij eerste keer / recreatie):
|
||||
# kind create cluster --config k8s/kind-config.yaml
|
||||
kind: Cluster
|
||||
apiVersion: kind.x-k8s.io/v1alpha4
|
||||
nodes:
|
||||
- role: control-plane
|
||||
extraPortMappings:
|
||||
- containerPort: 30090
|
||||
hostPort: 30090
|
||||
protocol: TCP
|
||||
Reference in New Issue
Block a user