mirror of
https://github.com/ghndrx/k8s-game-2048.git
synced 2026-02-10 14:54:59 +00:00
- Add build-image.yml workflow for automated builds to GHCR - Add SSL certificates and domain configuration for HTTPS - Update services to use ghcr.io/ghndrx/k8s-game-2048:latest with imagePullPolicy: Always - Configure Kourier for SSL redirect and domain claims - Enable HTTPS for all environments: dev, staging, prod
54 lines
1.3 KiB
YAML
54 lines
1.3 KiB
YAML
apiVersion: serving.knative.dev/v1
|
|
kind: Service
|
|
metadata:
|
|
name: game-2048-dev
|
|
namespace: game-2048-dev
|
|
labels:
|
|
app: game-2048
|
|
environment: development
|
|
spec:
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: game-2048
|
|
environment: development
|
|
annotations:
|
|
# Scale to zero configuration
|
|
autoscaling.knative.dev/minScale: "0"
|
|
autoscaling.knative.dev/maxScale: "10"
|
|
autoscaling.knative.dev/scaleDownDelay: "30s"
|
|
autoscaling.knative.dev/target: "100"
|
|
spec:
|
|
containers:
|
|
- name: game-2048
|
|
image: ghcr.io/ghndrx/k8s-game-2048:latest
|
|
imagePullPolicy: Always
|
|
ports:
|
|
- containerPort: 8080
|
|
protocol: TCP
|
|
env:
|
|
- name: ENVIRONMENT
|
|
value: "development"
|
|
resources:
|
|
requests:
|
|
cpu: 100m
|
|
memory: 128Mi
|
|
limits:
|
|
cpu: 500m
|
|
memory: 256Mi
|
|
readinessProbe:
|
|
httpGet:
|
|
path: /
|
|
port: 8080
|
|
initialDelaySeconds: 5
|
|
periodSeconds: 10
|
|
livenessProbe:
|
|
httpGet:
|
|
path: /health
|
|
port: 8080
|
|
initialDelaySeconds: 15
|
|
periodSeconds: 20
|
|
traffic:
|
|
- percent: 100
|
|
latestRevision: true
|